aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2010-11-09 09:09:53 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2010-11-30 05:22:48 -0500
commit9e55cd53728719ac3a3234a6618259ab8e203a10 (patch)
tree65888b1c6fafcc94520891c810384dbcd0e2ba0c /fs/gfs2
parentcc18152eb7c27653199546bd14e991a451ab8d1b (diff)
GFS2: Remove unreachable calls to vmtruncate
Suggested-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/inode.c9
-rw-r--r--fs/gfs2/ops_inode.c9
-rw-r--r--fs/gfs2/xattr.c9
3 files changed, 0 insertions, 27 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index e1213f7f921..14e682dbe8b 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -916,17 +916,8 @@ static int __gfs2_setattr_simple(struct gfs2_inode *ip, struct iattr *attr)
916 if (error) 916 if (error)
917 return error; 917 return error;
918 918
919 if ((attr->ia_valid & ATTR_SIZE) &&
920 attr->ia_size != i_size_read(inode)) {
921 error = vmtruncate(inode, attr->ia_size);
922 if (error)
923 return error;
924 }
925
926 setattr_copy(inode, attr); 919 setattr_copy(inode, attr);
927 mark_inode_dirty(inode); 920 mark_inode_dirty(inode);
928
929 gfs2_assert_warn(GFS2_SB(inode), !error);
930 gfs2_trans_add_bh(ip->i_gl, dibh, 1); 921 gfs2_trans_add_bh(ip->i_gl, dibh, 1);
931 gfs2_dinode_out(ip, dibh->b_data); 922 gfs2_dinode_out(ip, dibh->b_data);
932 brelse(dibh); 923 brelse(dibh);
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c
index 12cbea7502c..457ecd15518 100644
--- a/fs/gfs2/ops_inode.c
+++ b/fs/gfs2/ops_inode.c
@@ -1104,17 +1104,8 @@ static int setattr_chown(struct inode *inode, struct iattr *attr)
1104 if (error) 1104 if (error)
1105 goto out_end_trans; 1105 goto out_end_trans;
1106 1106
1107 if ((attr->ia_valid & ATTR_SIZE) &&
1108 attr->ia_size != i_size_read(inode)) {
1109 int error;
1110
1111 error = vmtruncate(inode, attr->ia_size);
1112 gfs2_assert_warn(sdp, !error);
1113 }
1114
1115 setattr_copy(inode, attr); 1107 setattr_copy(inode, attr);
1116 mark_inode_dirty(inode); 1108 mark_inode_dirty(inode);
1117
1118 gfs2_trans_add_bh(ip->i_gl, dibh, 1); 1109 gfs2_trans_add_bh(ip->i_gl, dibh, 1);
1119 gfs2_dinode_out(ip, dibh->b_data); 1110 gfs2_dinode_out(ip, dibh->b_data);
1120 brelse(dibh); 1111 brelse(dibh);
diff --git a/fs/gfs2/xattr.c b/fs/gfs2/xattr.c
index 30b58f07c8a..ecfd40dd28a 100644
--- a/fs/gfs2/xattr.c
+++ b/fs/gfs2/xattr.c
@@ -1325,17 +1325,8 @@ int gfs2_xattr_acl_chmod(struct gfs2_inode *ip, struct iattr *attr, char *data)
1325 if (error) 1325 if (error)
1326 goto out_trans_end; 1326 goto out_trans_end;
1327 1327
1328 if ((attr->ia_valid & ATTR_SIZE) &&
1329 attr->ia_size != i_size_read(inode)) {
1330 int error;
1331
1332 error = vmtruncate(inode, attr->ia_size);
1333 gfs2_assert_warn(GFS2_SB(inode), !error);
1334 }
1335
1336 setattr_copy(inode, attr); 1328 setattr_copy(inode, attr);
1337 mark_inode_dirty(inode); 1329 mark_inode_dirty(inode);
1338
1339 gfs2_trans_add_bh(ip->i_gl, dibh, 1); 1330 gfs2_trans_add_bh(ip->i_gl, dibh, 1);
1340 gfs2_dinode_out(ip, dibh->b_data); 1331 gfs2_dinode_out(ip, dibh->b_data);
1341 brelse(dibh); 1332 brelse(dibh);