aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r--fs/gfs2/inode.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index c3fe8aa03c4e..5f50dd53bf63 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -273,8 +273,7 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf)
273 ip->i_inode.i_nlink = be32_to_cpu(str->di_nlink); 273 ip->i_inode.i_nlink = be32_to_cpu(str->di_nlink);
274 di->di_size = be64_to_cpu(str->di_size); 274 di->di_size = be64_to_cpu(str->di_size);
275 i_size_write(&ip->i_inode, di->di_size); 275 i_size_write(&ip->i_inode, di->di_size);
276 di->di_blocks = be64_to_cpu(str->di_blocks); 276 gfs2_set_inode_blocks(&ip->i_inode, be64_to_cpu(str->di_blocks));
277 gfs2_set_inode_blocks(&ip->i_inode);
278 ip->i_inode.i_atime.tv_sec = be64_to_cpu(str->di_atime); 277 ip->i_inode.i_atime.tv_sec = be64_to_cpu(str->di_atime);
279 ip->i_inode.i_atime.tv_nsec = be32_to_cpu(str->di_atime_nsec); 278 ip->i_inode.i_atime.tv_nsec = be32_to_cpu(str->di_atime_nsec);
280 ip->i_inode.i_mtime.tv_sec = be64_to_cpu(str->di_mtime); 279 ip->i_inode.i_mtime.tv_sec = be64_to_cpu(str->di_mtime);
@@ -344,7 +343,7 @@ int gfs2_dinode_dealloc(struct gfs2_inode *ip)
344 struct gfs2_rgrpd *rgd; 343 struct gfs2_rgrpd *rgd;
345 int error; 344 int error;
346 345
347 if (ip->i_di.di_blocks != 1) { 346 if (gfs2_get_inode_blocks(&ip->i_inode) != 1) {
348 if (gfs2_consist_inode(ip)) 347 if (gfs2_consist_inode(ip))
349 gfs2_dinode_print(ip); 348 gfs2_dinode_print(ip);
350 return -EIO; 349 return -EIO;
@@ -1398,7 +1397,7 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf)
1398 str->di_gid = cpu_to_be32(ip->i_inode.i_gid); 1397 str->di_gid = cpu_to_be32(ip->i_inode.i_gid);
1399 str->di_nlink = cpu_to_be32(ip->i_inode.i_nlink); 1398 str->di_nlink = cpu_to_be32(ip->i_inode.i_nlink);
1400 str->di_size = cpu_to_be64(di->di_size); 1399 str->di_size = cpu_to_be64(di->di_size);
1401 str->di_blocks = cpu_to_be64(di->di_blocks); 1400 str->di_blocks = cpu_to_be64(gfs2_get_inode_blocks(&ip->i_inode));
1402 str->di_atime = cpu_to_be64(ip->i_inode.i_atime.tv_sec); 1401 str->di_atime = cpu_to_be64(ip->i_inode.i_atime.tv_sec);
1403 str->di_mtime = cpu_to_be64(ip->i_inode.i_mtime.tv_sec); 1402 str->di_mtime = cpu_to_be64(ip->i_inode.i_mtime.tv_sec);
1404 str->di_ctime = cpu_to_be64(ip->i_inode.i_ctime.tv_sec); 1403 str->di_ctime = cpu_to_be64(ip->i_inode.i_ctime.tv_sec);
@@ -1430,8 +1429,8 @@ void gfs2_dinode_print(const struct gfs2_inode *ip)
1430 printk(KERN_INFO " no_addr = %llu\n", 1429 printk(KERN_INFO " no_addr = %llu\n",
1431 (unsigned long long)ip->i_no_addr); 1430 (unsigned long long)ip->i_no_addr);
1432 printk(KERN_INFO " di_size = %llu\n", (unsigned long long)di->di_size); 1431 printk(KERN_INFO " di_size = %llu\n", (unsigned long long)di->di_size);
1433 printk(KERN_INFO " di_blocks = %llu\n", 1432 printk(KERN_INFO " blocks = %llu\n",
1434 (unsigned long long)di->di_blocks); 1433 (unsigned long long)gfs2_get_inode_blocks(&ip->i_inode));
1435 printk(KERN_INFO " i_goal = %llu\n", 1434 printk(KERN_INFO " i_goal = %llu\n",
1436 (unsigned long long)ip->i_goal); 1435 (unsigned long long)ip->i_goal);
1437 printk(KERN_INFO " di_flags = 0x%.8X\n", di->di_flags); 1436 printk(KERN_INFO " di_flags = 0x%.8X\n", di->di_flags);