summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-09-04 13:55:48 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-09-04 13:55:48 -0400
commitc26687113aea9a11c6f23ddf668f1fe43eca4ce7 (patch)
treee5cea81468e2b10e5c379a7c11fd56640d9c5c56
parentcd915493fce912f1bd838ee1250737ecf33b8fae (diff)
downloadlinux-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>
-rw-r--r--fs/gfs2/bmap.c2
-rw-r--r--fs/gfs2/inode.c27
2 files changed, 15 insertions, 14 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index a97ad74d880c..0f9567fe5c8b 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -344,7 +344,7 @@ static void find_metapath(struct gfs2_inode *ip, u64 block,
unsigned int i;
for (i = ip->i_di.di_height; i--;)
- mp->mp_list[i] = (__u16)do_div(b, sdp->sd_inptrs);
+ mp->mp_list[i] = do_div(b, sdp->sd_inptrs);
}
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;