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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user