diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-11-08 15:45:46 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-11-30 10:34:52 -0500 |
commit | 9e2dbdac3df300516ffdd9a8631f23164d068a50 (patch) | |
tree | 088a7dce1a0cc678a80ca1609642e7e3ecacd4dd /fs/gfs2/inode.h | |
parent | e7c698d74fc9e0e76b3086062b0519df3601ff52 (diff) | |
download | op-kernel-dev-9e2dbdac3df300516ffdd9a8631f23164d068a50.zip op-kernel-dev-9e2dbdac3df300516ffdd9a8631f23164d068a50.tar.gz |
[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 <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/inode.h')
-rw-r--r-- | fs/gfs2/inode.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/gfs2/inode.h b/fs/gfs2/inode.h index 54d584e..46917ed 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); |