aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-11-12 06:54:02 -0500
committerBen Myers <bpm@sgi.com>2012-11-15 22:34:05 -0500
commiteab4e63368b4cfa597dbdac66d1a7a836a693b7d (patch)
tree37d6756a3fd9e43ecf65d1b4a3950ecd34ad653f /fs/xfs/xfs_mount.c
parentc3f8fc73ac97b76a12692088ef9cace9af8422c0 (diff)
xfs: uncached buffer reads need to return an error
With verification being done as an IO completion callback, different errors can be returned from a read. Uncached reads only return a buffer or NULL on failure, which means the verification error cannot be returned to the caller. Split the error handling for these reads into two - a failure to get a buffer will still return NULL, but a read error will return a referenced buffer with b_error set rather than NULL. The caller is responsible for checking the error state of the buffer returned. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Phil White <pwhite@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r--fs/xfs/xfs_mount.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index d5402b0eb6a3..df6d0b2aade1 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -658,6 +658,12 @@ reread:
658 xfs_warn(mp, "SB buffer read failed"); 658 xfs_warn(mp, "SB buffer read failed");
659 return EIO; 659 return EIO;
660 } 660 }
661 if (bp->b_error) {
662 error = bp->b_error;
663 if (loud)
664 xfs_warn(mp, "SB validate failed");
665 goto release_buf;
666 }
661 667
662 /* 668 /*
663 * Initialize the mount structure from the superblock. 669 * Initialize the mount structure from the superblock.