summaryrefslogtreecommitdiff
path: root/fs/gfs2/aops.c
diff options
context:
space:
mode:
authornpiggin@suse.de <npiggin@suse.de>2010-05-26 19:05:34 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-05-28 06:15:42 +0400
commit15c6fd9786dfaab43547bf60df6fa63170fb64fc (patch)
treeafd997b3402761e28b6c39f414fbd93c69fdcdce /fs/gfs2/aops.c
parent7bb46a6734a7e1ad4beaecc11cae7ed3ff81d30f (diff)
downloadlinux-15c6fd9786dfaab43547bf60df6fa63170fb64fc.tar.xz
kill spurious reference to vmtruncate
Lots of filesystems calls vmtruncate despite not implementing the old ->truncate method. Switch them to use simple_setsize and add some comments about the truncate code where it seems fitting. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/gfs2/aops.c')
-rw-r--r--fs/gfs2/aops.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index a739a0a48067..9f8b52500d63 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -700,8 +700,14 @@ out:
return 0;
page_cache_release(page);
+
+ /*
+ * XXX(hch): the call below should probably be replaced with
+ * a call to the gfs2-specific truncate blocks helper to actually
+ * release disk blocks..
+ */
if (pos + len > ip->i_inode.i_size)
- vmtruncate(&ip->i_inode, ip->i_inode.i_size);
+ simple_setsize(&ip->i_inode, ip->i_inode.i_size);
out_endtrans:
gfs2_trans_end(sdp);
out_trans_fail: