diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2010-08-11 10:53:11 +0200 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2010-09-20 12:18:29 +0200 |
commit | a2e0f79939e09e74698564b88dee709db208e1e2 (patch) | |
tree | 0018e445e3d47c4558901153733899ef672f789e /fs/gfs2/aops.c | |
parent | GFS2: New truncate sequence (diff) | |
download | linux-a2e0f79939e09e74698564b88dee709db208e1e2.tar.xz linux-a2e0f79939e09e74698564b88dee709db208e1e2.zip |
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.c | 6 |
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, page_cache_release(page); if (copied) { - if (inode->i_size < to) { + if (inode->i_size < to) i_size_write(inode, to); - ip->i_disksize = inode->i_size; - } gfs2_dinode_out(ip, di); mark_inode_dirty(inode); } @@ -874,8 +872,6 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping, ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata); if (ret > 0) { - if (inode->i_size > ip->i_disksize) - ip->i_disksize = inode->i_size; gfs2_dinode_out(ip, dibh->b_data); mark_inode_dirty(inode); } |