diff options
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r-- | fs/gfs2/inode.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 19b2736cd52f..ea9ca239c878 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -38,29 +38,12 @@ | |||
38 | #include "trans.h" | 38 | #include "trans.h" |
39 | #include "util.h" | 39 | #include "util.h" |
40 | 40 | ||
41 | /** | ||
42 | * gfs2_inode_attr_in - Copy attributes from the dinode into the VFS inode | ||
43 | * @ip: The GFS2 inode (with embedded disk inode data) | ||
44 | * @inode: The Linux VFS inode | ||
45 | * | ||
46 | */ | ||
47 | |||
48 | void gfs2_inode_attr_in(struct gfs2_inode *ip) | ||
49 | { | ||
50 | struct inode *inode = &ip->i_inode; | ||
51 | struct gfs2_dinode_host *di = &ip->i_di; | ||
52 | |||
53 | i_size_write(inode, di->di_size); | ||
54 | inode->i_blocks = di->di_blocks << | ||
55 | (GFS2_SB(inode)->sd_sb.sb_bsize_shift - GFS2_BASIC_BLOCK_SHIFT); | ||
56 | } | ||
57 | |||
58 | static int iget_test(struct inode *inode, void *opaque) | 41 | static int iget_test(struct inode *inode, void *opaque) |
59 | { | 42 | { |
60 | struct gfs2_inode *ip = GFS2_I(inode); | 43 | struct gfs2_inode *ip = GFS2_I(inode); |
61 | struct gfs2_inum_host *inum = opaque; | 44 | struct gfs2_inum_host *inum = opaque; |
62 | 45 | ||
63 | if (ip && ip->i_num.no_addr == inum->no_addr) | 46 | if (ip->i_num.no_addr == inum->no_addr) |
64 | return 1; | 47 | return 1; |
65 | 48 | ||
66 | return 0; | 49 | return 0; |
@@ -187,7 +170,9 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf) | |||
187 | */ | 170 | */ |
188 | ip->i_inode.i_nlink = be32_to_cpu(str->di_nlink); | 171 | ip->i_inode.i_nlink = be32_to_cpu(str->di_nlink); |
189 | di->di_size = be64_to_cpu(str->di_size); | 172 | di->di_size = be64_to_cpu(str->di_size); |
173 | i_size_write(&ip->i_inode, di->di_size); | ||
190 | di->di_blocks = be64_to_cpu(str->di_blocks); | 174 | di->di_blocks = be64_to_cpu(str->di_blocks); |
175 | gfs2_set_inode_blocks(&ip->i_inode); | ||
191 | ip->i_inode.i_atime.tv_sec = be64_to_cpu(str->di_atime); | 176 | ip->i_inode.i_atime.tv_sec = be64_to_cpu(str->di_atime); |
192 | ip->i_inode.i_atime.tv_nsec = 0; | 177 | ip->i_inode.i_atime.tv_nsec = 0; |
193 | ip->i_inode.i_mtime.tv_sec = be64_to_cpu(str->di_mtime); | 178 | ip->i_inode.i_mtime.tv_sec = be64_to_cpu(str->di_mtime); |