[Top] [All Lists]

Re: [PATCH] xfs: kill xfs_buf_geterror()

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: kill xfs_buf_geterror()
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 27 May 2014 03:44:46 -0700
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1400802807-19936-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1400802807-19936-1-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Fri, May 23, 2014 at 09:53:27AM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> Most of the callers are just calling ASSERT(!xfs_buf_geterror())
> which means they are checking for bp->b_error == 0. If bp is null in
> this case, we will assert fail, and hence it's no different in
> result to oopsing because of a null bp. In some cases, errors have
> already been checked for or the function returning the buffer can't
> return a buffer with an error, so it's just a redundant assert.
> Either way, the assert can either be removed.
> The other two non-assert callers can just test for a buffer and
> error properly.

Looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

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