xfs: replace xfs_buf_geterror() with bp->b_error
Chandra Seetharaman [Wed, 3 Aug 2011 02:18:34 +0000 (02:18 +0000)]
Since we just checked bp for NULL, it is ok to replace
xfs_buf_geterror() with bp->b_error in these places.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Alex Elder <aelder@sgi.com>

fs/xfs/xfs_log_recover.c
fs/xfs/xfs_vnodeops.c

index b9afff8..a199dbc 100644 (file)
@@ -2133,7 +2133,7 @@ xlog_recover_buffer_pass2(
                          buf_flags);
        if (!bp)
                return XFS_ERROR(ENOMEM);
-       error = xfs_buf_geterror(bp);
+       error = bp->b_error;
        if (error) {
                xfs_ioerror_alert("xlog_recover_do..(read#1)", mp,
                                  bp, buf_f->blf_blkno);
@@ -2228,7 +2228,7 @@ xlog_recover_inode_pass2(
                error = ENOMEM;
                goto error;
        }
-       error = xfs_buf_geterror(bp);
+       error = bp->b_error;
        if (error) {
                xfs_ioerror_alert("xlog_recover_do..(read#2)", mp,
                                  bp, in_f->ilf_blkno);
index 2a432d0..51fc429 100644 (file)
@@ -85,7 +85,7 @@ xfs_readlink_bmap(
                                  XBF_LOCK | XBF_MAPPED | XBF_DONT_BLOCK);
                if (!bp)
                        return XFS_ERROR(ENOMEM);
-               error = xfs_buf_geterror(bp);
+               error = bp->b_error;
                if (error) {
                        xfs_ioerror_alert("xfs_readlink",
                                  ip->i_mount, bp, XFS_BUF_ADDR(bp));