From 9e2dbdac3df300516ffdd9a8631f23164d068a50 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 8 Nov 2006 15:45:46 -0500 Subject: [GFS2] Remove gfs2_inode_attr_in This function wasn't really doing the right thing. There was no need to update the inode size at this point and the updating of the i_blocks field has now been moved to the places where di_blocks is updated. A result of this patch and some those preceeding it is that unlocking a glock is now a much more efficient process, since there is no longer any requirement to copy data from the gfs2 inode into the vfs inode at this point. Signed-off-by: Steven Whitehouse --- fs/gfs2/inode.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fs/gfs2/inode.h') diff --git a/fs/gfs2/inode.h b/fs/gfs2/inode.h index 54d584eddf29..46917edfdd6c 100644 --- a/fs/gfs2/inode.h +++ b/fs/gfs2/inode.h @@ -25,6 +25,13 @@ static inline int gfs2_is_dir(struct gfs2_inode *ip) return S_ISDIR(ip->i_inode.i_mode); } +static inline void gfs2_set_inode_blocks(struct inode *inode) +{ + struct gfs2_inode *ip = GFS2_I(inode); + inode->i_blocks = ip->i_di.di_blocks << + (GFS2_SB(inode)->sd_sb.sb_bsize_shift - GFS2_BASIC_BLOCK_SHIFT); +} + void gfs2_inode_attr_in(struct gfs2_inode *ip); struct inode *gfs2_inode_lookup(struct super_block *sb, struct gfs2_inum_host *inum, unsigned type); struct inode *gfs2_ilookup(struct super_block *sb, struct gfs2_inum_host *inum); -- cgit v1.2.3