diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2010-11-09 14:09:53 +0000 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2010-11-30 10:22:48 +0000 |
commit | 9e55cd53728719ac3a3234a6618259ab8e203a10 (patch) | |
tree | 65888b1c6fafcc94520891c810384dbcd0e2ba0c | |
parent | cc18152eb7c27653199546bd14e991a451ab8d1b (diff) | |
download | kernel_samsung_aries-9e55cd53728719ac3a3234a6618259ab8e203a10.zip kernel_samsung_aries-9e55cd53728719ac3a3234a6618259ab8e203a10.tar.gz kernel_samsung_aries-9e55cd53728719ac3a3234a6618259ab8e203a10.tar.bz2 |
GFS2: Remove unreachable calls to vmtruncate
Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
-rw-r--r-- | fs/gfs2/inode.c | 9 | ||||
-rw-r--r-- | fs/gfs2/ops_inode.c | 9 | ||||
-rw-r--r-- | fs/gfs2/xattr.c | 9 |
3 files changed, 0 insertions, 27 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index e1213f7..14e682d 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) if (error) return error; - if ((attr->ia_valid & ATTR_SIZE) && - attr->ia_size != i_size_read(inode)) { - error = vmtruncate(inode, attr->ia_size); - if (error) - return error; - } - setattr_copy(inode, attr); mark_inode_dirty(inode); - - gfs2_assert_warn(GFS2_SB(inode), !error); gfs2_trans_add_bh(ip->i_gl, dibh, 1); gfs2_dinode_out(ip, dibh->b_data); brelse(dibh); diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 12cbea7..457ecd1 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) if (error) goto out_end_trans; - if ((attr->ia_valid & ATTR_SIZE) && - attr->ia_size != i_size_read(inode)) { - int error; - - error = vmtruncate(inode, attr->ia_size); - gfs2_assert_warn(sdp, !error); - } - setattr_copy(inode, attr); mark_inode_dirty(inode); - gfs2_trans_add_bh(ip->i_gl, dibh, 1); gfs2_dinode_out(ip, dibh->b_data); brelse(dibh); diff --git a/fs/gfs2/xattr.c b/fs/gfs2/xattr.c index 30b58f0..ecfd40d 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) if (error) goto out_trans_end; - if ((attr->ia_valid & ATTR_SIZE) && - attr->ia_size != i_size_read(inode)) { - int error; - - error = vmtruncate(inode, attr->ia_size); - gfs2_assert_warn(GFS2_SB(inode), !error); - } - setattr_copy(inode, attr); mark_inode_dirty(inode); - gfs2_trans_add_bh(ip->i_gl, dibh, 1); gfs2_dinode_out(ip, dibh->b_data); brelse(dibh); |