xfs: kill xfs_buf_geterror()
authorDave Chinner <dchinner@redhat.com>
Fri, 6 Jun 2014 06:02:12 +0000 (16:02 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 6 Jun 2014 06:02:12 +0000 (16:02 +1000)
commit36de95567f910f5544060f50346d8677ae13ad22
tree072f4754d9b621182a4526e356cfeb03e6a4f605
parent556b8883cfac3d3203557e161ea8005f8b5479b2
xfs: kill xfs_buf_geterror()

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.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_alloc.c
fs/xfs/xfs_btree.c
fs/xfs/xfs_buf.h
fs/xfs/xfs_buf_item.c
fs/xfs/xfs_dquot.c
fs/xfs/xfs_ialloc.c
fs/xfs/xfs_log.c
fs/xfs/xfs_rtbitmap.c