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.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index 28ccca98839b..22a40bd0cce2 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -304,13 +304,13 @@ xfs_map_blocks(
304 xfs_iomap_t *mapp, 304 xfs_iomap_t *mapp,
305 int flags) 305 int flags)
306{ 306{
307 bhv_vnode_t *vp = vn_from_inode(inode); 307 xfs_inode_t *ip = XFS_I(inode);
308 int error, nmaps = 1; 308 int error, nmaps = 1;
309 309
310 error = xfs_bmap(xfs_vtoi(vp), offset, count, 310 error = xfs_bmap(ip, offset, count,
311 flags, mapp, &nmaps); 311 flags, mapp, &nmaps);
312 if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE))) 312 if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE)))
313 VMODIFY(vp); 313 xfs_iflags_set(ip, XFS_IMODIFIED);
314 return -error; 314 return -error;
315} 315}
316 316
@@ -1246,10 +1246,7 @@ xfs_vm_writepages(
1246 struct address_space *mapping, 1246 struct address_space *mapping,
1247 struct writeback_control *wbc) 1247 struct writeback_control *wbc)
1248{ 1248{
1249 struct bhv_vnode *vp = vn_from_inode(mapping->host); 1249 xfs_iflags_clear(XFS_I(mapping->host), XFS_ITRUNCATED);
1250
1251 if (VN_TRUNC(vp))
1252 VUNTRUNCATE(vp);
1253 return generic_writepages(mapping, wbc); 1250 return generic_writepages(mapping, wbc);
1254} 1251}
1255 1252