[PATCH 9/9] xfs: check xfs_buf_read_uncached returns correctly

Dave Chinner david at fromorbit.com
Fri Aug 15 18:58:43 CDT 2014


On Fri, Aug 15, 2014 at 05:56:08AM -0700, Christoph Hellwig wrote:
> On Fri, Aug 15, 2014 at 04:39:07PM +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner at redhat.com>
> > 
> > xfs_buf_read_uncached() has two failure modes. If can either return
> > NULL or bp->b_error != 0 depending on the type of failure, and not
> > all callers check for both. Fix it up.
> 
> I'd rather get rid of these annoying calling conventions.  Make it
> return and errno, and the bp in a pointer argument, with the bp
> never non-NULL in case of error.

Ok. I considered that, then just did the simple thing.

Cheers,

Dave.
-- 
Dave Chinner
david at fromorbit.com



More information about the xfs mailing list