[PATCH 1/5] fix: force shutdown handling in xfs_end_io

Christoph Hellwig
2011-11-08T08:58:50Z

[-- Attachment #1: xfs-fix-end-io-error-handling --]
[-- Type: text/plain, Size: 741 bytes --]

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

Signed-off-by: Christoph Hellwig <hch@lst.de>

---
fs/xfs/xfs_aops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/fs/xfs/xfs_aops.c
===================================================================
--- linux-2.6.orig/fs/xfs/xfs_aops.c 2011-11-02 09:00:45.569119028 +0100
+++ linux-2.6/fs/xfs/xfs_aops.c 2011-11-07 12:19:22.282316090 +0100
@@ -189,7 +189,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)