diff options
author | Christoph Hellwig <hch@lst.de> | 2008-12-03 06:20:38 -0500 |
---|---|---|
committer | Niv Sardi <xaiki@sgi.com> | 2008-12-03 23:39:24 -0500 |
commit | 583fa586f0e4a8222dd091ce971b85c1364f3d92 (patch) | |
tree | 93ed1eee41e7e9073c9a608c2db8d931e1c03490 /fs/xfs | |
parent | f95099ba5ae06b96a9c17ef93cc655f686d79077 (diff) |
kill vn_ioerror
There's just one caller of this helper, and it's much cleaner to just merge
the xfs_do_force_shutdown call into it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 17 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.c | 16 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.h | 1 |
3 files changed, 13 insertions, 21 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 | ||
diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c index ad18262d651b..a8cf97a4319a 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.c +++ b/fs/xfs/linux-2.6/xfs_vnode.c | |||
@@ -66,22 +66,6 @@ vn_iowake( | |||
66 | wake_up(vptosync(ip)); | 66 | wake_up(vptosync(ip)); |
67 | } | 67 | } |
68 | 68 | ||
69 | /* | ||
70 | * Volume managers supporting multiple paths can send back ENODEV when the | ||
71 | * final path disappears. In this case continuing to fill the page cache | ||
72 | * with dirty data which cannot be written out is evil, so prevent that. | ||
73 | */ | ||
74 | void | ||
75 | vn_ioerror( | ||
76 | xfs_inode_t *ip, | ||
77 | int error, | ||
78 | char *f, | ||
79 | int l) | ||
80 | { | ||
81 | if (unlikely(error == -ENODEV)) | ||
82 | xfs_do_force_shutdown(ip->i_mount, SHUTDOWN_DEVICE_REQ, f, l); | ||
83 | } | ||
84 | |||
85 | #ifdef XFS_INODE_TRACE | 69 | #ifdef XFS_INODE_TRACE |
86 | 70 | ||
87 | #define KTRACE_ENTER(ip, vk, s, line, ra) \ | 71 | #define KTRACE_ENTER(ip, vk, s, line, ra) \ |
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h index 314ca18bc603..07fed8837db9 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.h +++ b/fs/xfs/linux-2.6/xfs_vnode.h | |||
@@ -63,7 +63,6 @@ extern void vn_init(void); | |||
63 | */ | 63 | */ |
64 | extern void vn_iowait(struct xfs_inode *ip); | 64 | extern void vn_iowait(struct xfs_inode *ip); |
65 | extern void vn_iowake(struct xfs_inode *ip); | 65 | extern void vn_iowake(struct xfs_inode *ip); |
66 | extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l); | ||
67 | 66 | ||
68 | #define IHOLD(ip) \ | 67 | #define IHOLD(ip) \ |
69 | do { \ | 68 | do { \ |