aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/aops.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2010-08-11 04:53:11 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2010-09-20 06:18:29 -0400
commita2e0f79939e09e74698564b88dee709db208e1e2 (patch)
tree0018e445e3d47c4558901153733899ef672f789e /fs/gfs2/aops.c
parentff8f33c8b30d7b7efdcf2548c7f6e64db6a89b29 (diff)
GFS2: Remove i_disksize
With the update of the truncate code, ip->i_disksize and inode->i_size are merely copies of each other. This means we can remove ip->i_disksize and use inode->i_size exclusively reducing the size of a GFS2 inode by 8 bytes. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/aops.c')
-rw-r--r--fs/gfs2/aops.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index f687f25fb7ff..c92f36ba3fc9 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -800,10 +800,8 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh,
800 page_cache_release(page); 800 page_cache_release(page);
801 801
802 if (copied) { 802 if (copied) {
803 if (inode->i_size < to) { 803 if (inode->i_size < to)
804 i_size_write(inode, to); 804 i_size_write(inode, to);
805 ip->i_disksize = inode->i_size;
806 }
807 gfs2_dinode_out(ip, di); 805 gfs2_dinode_out(ip, di);
808 mark_inode_dirty(inode); 806 mark_inode_dirty(inode);
809 } 807 }
@@ -874,8 +872,6 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping,
874 872
875 ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata); 873 ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata);
876 if (ret > 0) { 874 if (ret > 0) {
877 if (inode->i_size > ip->i_disksize)
878 ip->i_disksize = inode->i_size;
879 gfs2_dinode_out(ip, dibh->b_data); 875 gfs2_dinode_out(ip, dibh->b_data);
880 mark_inode_dirty(inode); 876 mark_inode_dirty(inode);
881 } 877 }