xfs: check xfs_buf_read_uncached returns correctly
authorDave Chinner <dchinner@redhat.com>
Wed, 1 Oct 2014 23:05:32 +0000 (09:05 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 1 Oct 2014 23:05:32 +0000 (09:05 +1000)
commitba3726742c1712c43c5a18245476f3fe9fe74773
tree6d0d0b63f3785fff34b194a9bf4da785e9abeba6
parent595bff75dce51e0d6d94877b4b6d11b4747a63fd
xfs: check xfs_buf_read_uncached returns correctly

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 so that xfs_buf_read_uncached()
always returns the error status, and the buffer is returned as a
function parameter. The buffer will only be returned on success.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_buf.c
fs/xfs/xfs_buf.h
fs/xfs/xfs_fsops.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_rtalloc.c