From a2e0f79939e09e74698564b88dee709db208e1e2 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 11 Aug 2010 09:53:11 +0100 Subject: 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 --- fs/gfs2/aops.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'fs/gfs2/aops.c') diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index f687f25..c92f36b 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); } -- cgit v1.1