diff options
author | Dave Chinner <dchinner@redhat.com> | 2014-06-06 16:02:12 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-06-06 16:02:12 +1000 |
commit | 36de95567f910f5544060f50346d8677ae13ad22 (patch) | |
tree | 072f4754d9b621182a4526e356cfeb03e6a4f605 /fs/xfs/xfs_log.c | |
parent | 556b8883cfac3d3203557e161ea8005f8b5479b2 (diff) | |
download | op-kernel-dev-36de95567f910f5544060f50346d8677ae13ad22.zip op-kernel-dev-36de95567f910f5544060f50346d8677ae13ad22.tar.gz |
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>
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r-- | fs/xfs/xfs_log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index a5f8bd9..ae871df 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -1165,7 +1165,7 @@ xlog_iodone(xfs_buf_t *bp) /* * Race to shutdown the filesystem if we see an error. */ - if (XFS_TEST_ERROR((xfs_buf_geterror(bp)), l->l_mp, + if (XFS_TEST_ERROR(bp->b_error, l->l_mp, XFS_ERRTAG_IODONE_IOERR, XFS_RANDOM_IODONE_IOERR)) { xfs_buf_ioerror_alert(bp, __func__); xfs_buf_stale(bp); |