diff options
author | Christoph Hellwig <hch@infradead.org> | 2007-09-14 01:23:31 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-07 00:43:44 -0500 |
commit | 7642861b7eeaddfc82d762b3342044c809c3f77e (patch) | |
tree | badaaae721ab515df925b0b6eddf610e6678542e /fs/xfs/linux-2.6/xfs_aops.c | |
parent | 6214ed4461f1ad8aeec41857c73d58afb31be335 (diff) |
[XFS] kill BMAPI_UNWRITTEN
There is no reason to go through xfs_iomap for the BMAPI_UNWRITTEN because
it has nothing in common with the other cases. Instead check for the
shutdown filesystem in xfs_end_bio_unwritten and perform a direct call to
xfs_iomap_write_unwritten (which should be renamed to something more
sensible one day)
SGI-PV: 970241
SGI-Modid: xfs-linux-melb:xfs-kern:29681a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_aops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 43f5a75fc3c0..d23c561a6293 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -238,12 +238,13 @@ xfs_end_bio_unwritten( | |||
238 | { | 238 | { |
239 | xfs_ioend_t *ioend = | 239 | xfs_ioend_t *ioend = |
240 | container_of(work, xfs_ioend_t, io_work); | 240 | container_of(work, xfs_ioend_t, io_work); |
241 | struct xfs_inode *ip = XFS_I(ioend->io_inode); | ||
241 | xfs_off_t offset = ioend->io_offset; | 242 | xfs_off_t offset = ioend->io_offset; |
242 | size_t size = ioend->io_size; | 243 | size_t size = ioend->io_size; |
243 | 244 | ||
244 | if (likely(!ioend->io_error)) { | 245 | if (likely(!ioend->io_error)) { |
245 | xfs_bmap(XFS_I(ioend->io_inode), offset, size, | 246 | if (!XFS_FORCED_SHUTDOWN(ip->i_mount)) |
246 | BMAPI_UNWRITTEN, NULL, NULL); | 247 | xfs_iomap_write_unwritten(ip, offset, size); |
247 | xfs_setfilesize(ioend); | 248 | xfs_setfilesize(ioend); |
248 | } | 249 | } |
249 | xfs_destroy_ioend(ioend); | 250 | xfs_destroy_ioend(ioend); |