[PATCH] xfs: kill xfs_buf_geterror()

Christoph Hellwig hch at infradead.org
Tue May 27 05:44:46 CDT 2014


On Fri, May 23, 2014 at 09:53:27AM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
> 
> 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 at lst.de>



More information about the xfs mailing list