[PATCH 021/102] xfs: fix force shutdown handling in xfs_end_io

Dave Chinner
2012-08-23T05:02:56Z

From: Christoph Hellwig <hch@infradead.org>

Upstream commit: 810627d9a6d0e8820c798001875bc4e1b7754ebf

Ensure ioend->io_error gets propagated back to e.g. AIO completions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
---
fs/xfs/linux-2.6/xfs_aops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index 4ff2404..2426ecd 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -222,7 +222,7 @@ xfs_end_io(
int error = 0;

if (XFS_FORCED_SHUTDOWN(ip->i_mount)) {
- error = -EIO;
+ ioend->io_error = -EIO;
goto done;
}
if (ioend->io_error)