aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_aops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_aops.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index bb224d07e1ef..f35dba9bf1d9 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -146,16 +146,25 @@ xfs_destroy_ioend(
146 xfs_ioend_t *ioend) 146 xfs_ioend_t *ioend)
147{ 147{
148 struct buffer_head *bh, *next; 148 struct buffer_head *bh, *next;
149 struct xfs_inode *ip = XFS_I(ioend->io_inode);
149 150
150 for (bh = ioend->io_buffer_head; bh; bh = next) { 151 for (bh = ioend->io_buffer_head; bh; bh = next) {
151 next = bh->b_private; 152 next = bh->b_private;
152 bh->b_end_io(bh, !ioend->io_error); 153 bh->b_end_io(bh, !ioend->io_error);
153 } 154 }
154 if (unlikely(ioend->io_error)) { 155
155 vn_ioerror(XFS_I(ioend->io_inode), ioend->io_error, 156 /*
156 __FILE__,__LINE__); 157 * Volume managers supporting multiple paths can send back ENODEV
158 * when the final path disappears. In this case continuing to fill
159 * the page cache with dirty data which cannot be written out is
160 * evil, so prevent that.
161 */
162 if (unlikely(ioend->io_error == -ENODEV)) {
163 xfs_do_force_shutdown(ip->i_mount, SHUTDOWN_DEVICE_REQ,
164 __FILE__, __LINE__);
157 } 165 }
158 vn_iowake(XFS_I(ioend->io_inode)); 166
167 vn_iowake(ip);
159 mempool_free(ioend, xfs_ioend_pool); 168 mempool_free(ioend, xfs_ioend_pool);
160} 169}
161 170