diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-04 13:55:48 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-04 13:55:48 -0400 |
commit | c26687113aea9a11c6f23ddf668f1fe43eca4ce7 (patch) | |
tree | e5cea81468e2b10e5c379a7c11fd56640d9c5c56 /fs/gfs2/inode.c | |
parent | cd915493fce912f1bd838ee1250737ecf33b8fae (diff) | |
download | linux-c26687113aea9a11c6f23ddf668f1fe43eca4ce7.tar.bz2 |
[GFS2] Remove a cast, tidy gfs2_inode_attr_in
The remains of the changes for Jan Engelhardt's third email. Remove
a cast and tidy up gfs2_inode_attr_in.
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r-- | fs/gfs2/inode.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index f683a400b006..0d010f0654d9 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -47,40 +47,41 @@ void gfs2_inode_attr_in(struct gfs2_inode *ip) { struct inode *inode = &ip->i_inode; + struct gfs2_dinode *di = &ip->i_di; inode->i_ino = ip->i_num.no_addr; - switch (ip->i_di.di_mode & S_IFMT) { + switch (di->di_mode & S_IFMT) { case S_IFBLK: case S_IFCHR: - inode->i_rdev = MKDEV(ip->i_di.di_major, ip->i_di.di_minor); + inode->i_rdev = MKDEV(di->di_major, di->di_minor); break; default: inode->i_rdev = 0; break; }; - inode->i_mode = ip->i_di.di_mode; - inode->i_nlink = ip->i_di.di_nlink; - inode->i_uid = ip->i_di.di_uid; - inode->i_gid = ip->i_di.di_gid; - i_size_write(inode, ip->i_di.di_size); - inode->i_atime.tv_sec = ip->i_di.di_atime; - inode->i_mtime.tv_sec = ip->i_di.di_mtime; - inode->i_ctime.tv_sec = ip->i_di.di_ctime; + inode->i_mode = di->di_mode; + inode->i_nlink = di->di_nlink; + inode->i_uid = di->di_uid; + inode->i_gid = di->di_gid; + i_size_write(inode, di->di_size); + inode->i_atime.tv_sec = di->di_atime; + inode->i_mtime.tv_sec = di->di_mtime; + inode->i_ctime.tv_sec = di->di_ctime; inode->i_atime.tv_nsec = 0; inode->i_mtime.tv_nsec = 0; inode->i_ctime.tv_nsec = 0; inode->i_blksize = PAGE_SIZE; - inode->i_blocks = ip->i_di.di_blocks << + inode->i_blocks = di->di_blocks << (GFS2_SB(inode)->sd_sb.sb_bsize_shift - GFS2_BASIC_BLOCK_SHIFT); - if (ip->i_di.di_flags & GFS2_DIF_IMMUTABLE) + if (di->di_flags & GFS2_DIF_IMMUTABLE) inode->i_flags |= S_IMMUTABLE; else inode->i_flags &= ~S_IMMUTABLE; - if (ip->i_di.di_flags & GFS2_DIF_APPENDONLY) + if (di->di_flags & GFS2_DIF_APPENDONLY) inode->i_flags |= S_APPEND; else inode->i_flags &= ~S_APPEND; |