diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_aops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index e0519529c26c..a55c3b26d840 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -243,8 +243,12 @@ xfs_end_bio_unwritten( | |||
243 | size_t size = ioend->io_size; | 243 | size_t size = ioend->io_size; |
244 | 244 | ||
245 | if (likely(!ioend->io_error)) { | 245 | if (likely(!ioend->io_error)) { |
246 | if (!XFS_FORCED_SHUTDOWN(ip->i_mount)) | 246 | if (!XFS_FORCED_SHUTDOWN(ip->i_mount)) { |
247 | xfs_iomap_write_unwritten(ip, offset, size); | 247 | int error; |
248 | error = xfs_iomap_write_unwritten(ip, offset, size); | ||
249 | if (error) | ||
250 | ioend->io_error = error; | ||
251 | } | ||
248 | xfs_setfilesize(ioend); | 252 | xfs_setfilesize(ioend); |
249 | } | 253 | } |
250 | xfs_destroy_ioend(ioend); | 254 | xfs_destroy_ioend(ioend); |
@@ -1532,9 +1536,9 @@ xfs_vm_bmap( | |||
1532 | struct xfs_inode *ip = XFS_I(inode); | 1536 | struct xfs_inode *ip = XFS_I(inode); |
1533 | 1537 | ||
1534 | xfs_itrace_entry(XFS_I(inode)); | 1538 | xfs_itrace_entry(XFS_I(inode)); |
1535 | xfs_rwlock(ip, VRWLOCK_READ); | 1539 | xfs_ilock(ip, XFS_IOLOCK_SHARED); |
1536 | xfs_flush_pages(ip, (xfs_off_t)0, -1, 0, FI_REMAPF); | 1540 | xfs_flush_pages(ip, (xfs_off_t)0, -1, 0, FI_REMAPF); |
1537 | xfs_rwunlock(ip, VRWLOCK_READ); | 1541 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); |
1538 | return generic_block_bmap(mapping, block, xfs_get_blocks); | 1542 | return generic_block_bmap(mapping, block, xfs_get_blocks); |
1539 | } | 1543 | } |
1540 | 1544 | ||