[Top] [All Lists]

Re: [PATCH] don't use signed int to store xfs_dqid_t

To: Peter Leckie <pleckie@xxxxxxx>
Subject: Re: [PATCH] don't use signed int to store xfs_dqid_t
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 24 Sep 2008 16:07:39 +1000
Cc: xfs@xxxxxxxxxxx, xfs-dev <xfs-dev@xxxxxxx>
In-reply-to: <48D9C653.1030908@xxxxxxx>
Mail-followup-to: Peter Leckie <pleckie@xxxxxxx>, xfs@xxxxxxxxxxx, xfs-dev <xfs-dev@xxxxxxx>
References: <48D9C653.1030908@xxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Wed, Sep 24, 2008 at 02:47:15PM +1000, Peter Leckie wrote:
> When running xfsqa test 144 with quota's enabled it's possible to
> trip the following ASSERT(curid >= 0); from xfs_qm_init_dquot_blk().
> The reason this assert was tripped is the signed int currid was assigned
> an id from the unsigned xfs_dqid_t this works as long as the MSB in  
> xfs_dqid_t
> is not set. However if it is this translates to a negative number causing
> the assert to trip.
> The fix for this is simply replacing the signed int with type xfs_dqid_t
> and since xfs_dqid_t is unsigned there is no point checking if it's negative
> so remove the assert.

Looks good.


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>