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.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index baf8b24b2de7..97d3ce65e26f 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -247,7 +247,6 @@ fail:
247 247
248static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf) 248static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf)
249{ 249{
250 struct gfs2_dinode_host *di = &ip->i_di;
251 const struct gfs2_dinode *str = buf; 250 const struct gfs2_dinode *str = buf;
252 struct timespec atime; 251 struct timespec atime;
253 u16 height, depth; 252 u16 height, depth;
@@ -288,7 +287,7 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf)
288 ip->i_goal = be64_to_cpu(str->di_goal_meta); 287 ip->i_goal = be64_to_cpu(str->di_goal_meta);
289 ip->i_generation = be64_to_cpu(str->di_generation); 288 ip->i_generation = be64_to_cpu(str->di_generation);
290 289
291 di->di_flags = be32_to_cpu(str->di_flags); 290 ip->i_diskflags = be32_to_cpu(str->di_flags);
292 gfs2_set_inode_flags(&ip->i_inode); 291 gfs2_set_inode_flags(&ip->i_inode);
293 height = be16_to_cpu(str->di_height); 292 height = be16_to_cpu(str->di_height);
294 if (unlikely(height > GFS2_MAX_META_HEIGHT)) 293 if (unlikely(height > GFS2_MAX_META_HEIGHT))
@@ -789,11 +788,11 @@ static void init_dinode(struct gfs2_inode *dip, struct gfs2_glock *gl,
789 di->di_flags = 0; 788 di->di_flags = 0;
790 789
791 if (S_ISREG(mode)) { 790 if (S_ISREG(mode)) {
792 if ((dip->i_di.di_flags & GFS2_DIF_INHERIT_JDATA) || 791 if ((dip->i_diskflags & GFS2_DIF_INHERIT_JDATA) ||
793 gfs2_tune_get(sdp, gt_new_files_jdata)) 792 gfs2_tune_get(sdp, gt_new_files_jdata))
794 di->di_flags |= cpu_to_be32(GFS2_DIF_JDATA); 793 di->di_flags |= cpu_to_be32(GFS2_DIF_JDATA);
795 } else if (S_ISDIR(mode)) { 794 } else if (S_ISDIR(mode)) {
796 di->di_flags |= cpu_to_be32(dip->i_di.di_flags & 795 di->di_flags |= cpu_to_be32(dip->i_diskflags &
797 GFS2_DIF_INHERIT_JDATA); 796 GFS2_DIF_INHERIT_JDATA);
798 } 797 }
799 798
@@ -1241,7 +1240,6 @@ int gfs2_setattr_simple(struct gfs2_inode *ip, struct iattr *attr)
1241 1240
1242void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf) 1241void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf)
1243{ 1242{
1244 const struct gfs2_dinode_host *di = &ip->i_di;
1245 struct gfs2_dinode *str = buf; 1243 struct gfs2_dinode *str = buf;
1246 1244
1247 str->di_header.mh_magic = cpu_to_be32(GFS2_MAGIC); 1245 str->di_header.mh_magic = cpu_to_be32(GFS2_MAGIC);
@@ -1265,10 +1263,10 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf)
1265 str->di_goal_data = cpu_to_be64(ip->i_goal); 1263 str->di_goal_data = cpu_to_be64(ip->i_goal);
1266 str->di_generation = cpu_to_be64(ip->i_generation); 1264 str->di_generation = cpu_to_be64(ip->i_generation);
1267 1265
1268 str->di_flags = cpu_to_be32(di->di_flags); 1266 str->di_flags = cpu_to_be32(ip->i_diskflags);
1269 str->di_height = cpu_to_be16(ip->i_height); 1267 str->di_height = cpu_to_be16(ip->i_height);
1270 str->di_payload_format = cpu_to_be32(S_ISDIR(ip->i_inode.i_mode) && 1268 str->di_payload_format = cpu_to_be32(S_ISDIR(ip->i_inode.i_mode) &&
1271 !(ip->i_di.di_flags & GFS2_DIF_EXHASH) ? 1269 !(ip->i_diskflags & GFS2_DIF_EXHASH) ?
1272 GFS2_FORMAT_DE : 0); 1270 GFS2_FORMAT_DE : 0);
1273 str->di_depth = cpu_to_be16(ip->i_depth); 1271 str->di_depth = cpu_to_be16(ip->i_depth);
1274 str->di_entries = cpu_to_be32(ip->i_entries); 1272 str->di_entries = cpu_to_be32(ip->i_entries);
@@ -1281,8 +1279,6 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf)
1281 1279
1282void gfs2_dinode_print(const struct gfs2_inode *ip) 1280void gfs2_dinode_print(const struct gfs2_inode *ip)
1283{ 1281{
1284 const struct gfs2_dinode_host *di = &ip->i_di;
1285
1286 printk(KERN_INFO " no_formal_ino = %llu\n", 1282 printk(KERN_INFO " no_formal_ino = %llu\n",
1287 (unsigned long long)ip->i_no_formal_ino); 1283 (unsigned long long)ip->i_no_formal_ino);
1288 printk(KERN_INFO " no_addr = %llu\n", 1284 printk(KERN_INFO " no_addr = %llu\n",
@@ -1293,7 +1289,7 @@ void gfs2_dinode_print(const struct gfs2_inode *ip)
1293 (unsigned long long)gfs2_get_inode_blocks(&ip->i_inode)); 1289 (unsigned long long)gfs2_get_inode_blocks(&ip->i_inode));
1294 printk(KERN_INFO " i_goal = %llu\n", 1290 printk(KERN_INFO " i_goal = %llu\n",
1295 (unsigned long long)ip->i_goal); 1291 (unsigned long long)ip->i_goal);
1296 printk(KERN_INFO " di_flags = 0x%.8X\n", di->di_flags); 1292 printk(KERN_INFO " i_diskflags = 0x%.8X\n", ip->i_diskflags);
1297 printk(KERN_INFO " i_height = %u\n", ip->i_height); 1293 printk(KERN_INFO " i_height = %u\n", ip->i_height);
1298 printk(KERN_INFO " i_depth = %u\n", ip->i_depth); 1294 printk(KERN_INFO " i_depth = %u\n", ip->i_depth);
1299 printk(KERN_INFO " i_entries = %u\n", ip->i_entries); 1295 printk(KERN_INFO " i_entries = %u\n", ip->i_entries);