aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/acl.c2
-rw-r--r--fs/gfs2/eattr.c26
-rw-r--r--fs/gfs2/incore.h2
-rw-r--r--fs/gfs2/inode.c8
-rw-r--r--fs/gfs2/ops_super.c2
5 files changed, 20 insertions, 20 deletions
diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c
index 3e9bd46f27e3..e335dceb6a4f 100644
--- a/fs/gfs2/acl.c
+++ b/fs/gfs2/acl.c
@@ -91,7 +91,7 @@ static int acl_get(struct gfs2_inode *ip, int access, struct posix_acl **acl,
91 struct gfs2_ea_location el_this; 91 struct gfs2_ea_location el_this;
92 int error; 92 int error;
93 93
94 if (!ip->i_di.di_eattr) 94 if (!ip->i_eattr)
95 return 0; 95 return 0;
96 96
97 memset(&er, 0, sizeof(struct gfs2_ea_request)); 97 memset(&er, 0, sizeof(struct gfs2_ea_request));
diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c
index e3f76f451b0a..1c1e06136aaa 100644
--- a/fs/gfs2/eattr.c
+++ b/fs/gfs2/eattr.c
@@ -114,7 +114,7 @@ static int ea_foreach(struct gfs2_inode *ip, ea_call_t ea_call, void *data)
114 __be64 *eablk, *end; 114 __be64 *eablk, *end;
115 int error; 115 int error;
116 116
117 error = gfs2_meta_read(ip->i_gl, ip->i_di.di_eattr, DIO_WAIT, &bh); 117 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, &bh);
118 if (error) 118 if (error)
119 return error; 119 return error;
120 120
@@ -414,7 +414,7 @@ int gfs2_ea_list(struct gfs2_inode *ip, struct gfs2_ea_request *er)
414 if (error) 414 if (error)
415 return error; 415 return error;
416 416
417 if (ip->i_di.di_eattr) { 417 if (ip->i_eattr) {
418 struct ea_list ei = { .ei_er = er, .ei_size = 0 }; 418 struct ea_list ei = { .ei_er = er, .ei_size = 0 };
419 419
420 error = ea_foreach(ip, ea_list_i, &ei); 420 error = ea_foreach(ip, ea_list_i, &ei);
@@ -514,7 +514,7 @@ int gfs2_ea_get_i(struct gfs2_inode *ip, struct gfs2_ea_request *er)
514 struct gfs2_ea_location el; 514 struct gfs2_ea_location el;
515 int error; 515 int error;
516 516
517 if (!ip->i_di.di_eattr) 517 if (!ip->i_eattr)
518 return -ENODATA; 518 return -ENODATA;
519 519
520 error = gfs2_ea_find(ip, er, &el); 520 error = gfs2_ea_find(ip, er, &el);
@@ -741,7 +741,7 @@ static int ea_init_i(struct gfs2_inode *ip, struct gfs2_ea_request *er,
741 if (error) 741 if (error)
742 return error; 742 return error;
743 743
744 ip->i_di.di_eattr = bh->b_blocknr; 744 ip->i_eattr = bh->b_blocknr;
745 error = ea_write(ip, GFS2_EA_BH2FIRST(bh), er); 745 error = ea_write(ip, GFS2_EA_BH2FIRST(bh), er);
746 746
747 brelse(bh); 747 brelse(bh);
@@ -938,7 +938,7 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er,
938 if (ip->i_di.di_flags & GFS2_DIF_EA_INDIRECT) { 938 if (ip->i_di.di_flags & GFS2_DIF_EA_INDIRECT) {
939 __be64 *end; 939 __be64 *end;
940 940
941 error = gfs2_meta_read(ip->i_gl, ip->i_di.di_eattr, DIO_WAIT, 941 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT,
942 &indbh); 942 &indbh);
943 if (error) 943 if (error)
944 return error; 944 return error;
@@ -972,8 +972,8 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er,
972 gfs2_buffer_clear_tail(indbh, mh_size); 972 gfs2_buffer_clear_tail(indbh, mh_size);
973 973
974 eablk = (__be64 *)(indbh->b_data + mh_size); 974 eablk = (__be64 *)(indbh->b_data + mh_size);
975 *eablk = cpu_to_be64(ip->i_di.di_eattr); 975 *eablk = cpu_to_be64(ip->i_eattr);
976 ip->i_di.di_eattr = blk; 976 ip->i_eattr = blk;
977 ip->i_di.di_flags |= GFS2_DIF_EA_INDIRECT; 977 ip->i_di.di_flags |= GFS2_DIF_EA_INDIRECT;
978 gfs2_add_inode_blocks(&ip->i_inode, 1); 978 gfs2_add_inode_blocks(&ip->i_inode, 1);
979 979
@@ -1040,7 +1040,7 @@ int gfs2_ea_set_i(struct gfs2_inode *ip, struct gfs2_ea_request *er)
1040 struct gfs2_ea_location el; 1040 struct gfs2_ea_location el;
1041 int error; 1041 int error;
1042 1042
1043 if (!ip->i_di.di_eattr) { 1043 if (!ip->i_eattr) {
1044 if (er->er_flags & XATTR_REPLACE) 1044 if (er->er_flags & XATTR_REPLACE)
1045 return -ENODATA; 1045 return -ENODATA;
1046 return ea_init(ip, er); 1046 return ea_init(ip, er);
@@ -1145,7 +1145,7 @@ int gfs2_ea_remove_i(struct gfs2_inode *ip, struct gfs2_ea_request *er)
1145 struct gfs2_ea_location el; 1145 struct gfs2_ea_location el;
1146 int error; 1146 int error;
1147 1147
1148 if (!ip->i_di.di_eattr) 1148 if (!ip->i_eattr)
1149 return -ENODATA; 1149 return -ENODATA;
1150 1150
1151 error = gfs2_ea_find(ip, er, &el); 1151 error = gfs2_ea_find(ip, er, &el);
@@ -1309,7 +1309,7 @@ static int ea_dealloc_indirect(struct gfs2_inode *ip)
1309 1309
1310 memset(&rlist, 0, sizeof(struct gfs2_rgrp_list)); 1310 memset(&rlist, 0, sizeof(struct gfs2_rgrp_list));
1311 1311
1312 error = gfs2_meta_read(ip->i_gl, ip->i_di.di_eattr, DIO_WAIT, &indbh); 1312 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, &indbh);
1313 if (error) 1313 if (error)
1314 return error; 1314 return error;
1315 1315
@@ -1416,7 +1416,7 @@ static int ea_dealloc_block(struct gfs2_inode *ip)
1416 struct buffer_head *dibh; 1416 struct buffer_head *dibh;
1417 int error; 1417 int error;
1418 1418
1419 rgd = gfs2_blk2rgrpd(sdp, ip->i_di.di_eattr); 1419 rgd = gfs2_blk2rgrpd(sdp, ip->i_eattr);
1420 if (!rgd) { 1420 if (!rgd) {
1421 gfs2_consist_inode(ip); 1421 gfs2_consist_inode(ip);
1422 return -EIO; 1422 return -EIO;
@@ -1432,9 +1432,9 @@ static int ea_dealloc_block(struct gfs2_inode *ip)
1432 if (error) 1432 if (error)
1433 goto out_gunlock; 1433 goto out_gunlock;
1434 1434
1435 gfs2_free_meta(ip, ip->i_di.di_eattr, 1); 1435 gfs2_free_meta(ip, ip->i_eattr, 1);
1436 1436
1437 ip->i_di.di_eattr = 0; 1437 ip->i_eattr = 0;
1438 gfs2_add_inode_blocks(&ip->i_inode, -1); 1438 gfs2_add_inode_blocks(&ip->i_inode, -1);
1439 1439
1440 error = gfs2_meta_inode_buffer(ip, &dibh); 1440 error = gfs2_meta_inode_buffer(ip, &dibh);
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 15ca3a75cf12..fb2fd4adaae4 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -236,7 +236,6 @@ enum {
236struct gfs2_dinode_host { 236struct gfs2_dinode_host {
237 u64 di_size; /* number of bytes in file */ 237 u64 di_size; /* number of bytes in file */
238 u32 di_flags; /* GFS2_DIF_... */ 238 u32 di_flags; /* GFS2_DIF_... */
239 u64 di_eattr; /* extended attribute block number */
240}; 239};
241 240
242struct gfs2_inode { 241struct gfs2_inode {
@@ -244,6 +243,7 @@ struct gfs2_inode {
244 u64 i_no_addr; 243 u64 i_no_addr;
245 u64 i_no_formal_ino; 244 u64 i_no_formal_ino;
246 u64 i_generation; 245 u64 i_generation;
246 u64 i_eattr;
247 unsigned long i_flags; /* GIF_... */ 247 unsigned long i_flags; /* GIF_... */
248 248
249 struct gfs2_dinode_host i_di; /* To be replaced by ref to block */ 249 struct gfs2_dinode_host i_di; /* To be replaced by ref to block */
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 015d4c007086..91735b8cecd8 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -301,7 +301,7 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf)
301 ip->i_depth = (u8)depth; 301 ip->i_depth = (u8)depth;
302 ip->i_entries = be32_to_cpu(str->di_entries); 302 ip->i_entries = be32_to_cpu(str->di_entries);
303 303
304 di->di_eattr = be64_to_cpu(str->di_eattr); 304 ip->i_eattr = be64_to_cpu(str->di_eattr);
305 if (S_ISREG(ip->i_inode.i_mode)) 305 if (S_ISREG(ip->i_inode.i_mode))
306 gfs2_set_aops(&ip->i_inode); 306 gfs2_set_aops(&ip->i_inode);
307 307
@@ -1273,7 +1273,7 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf)
1273 str->di_depth = cpu_to_be16(ip->i_depth); 1273 str->di_depth = cpu_to_be16(ip->i_depth);
1274 str->di_entries = cpu_to_be32(ip->i_entries); 1274 str->di_entries = cpu_to_be32(ip->i_entries);
1275 1275
1276 str->di_eattr = cpu_to_be64(di->di_eattr); 1276 str->di_eattr = cpu_to_be64(ip->i_eattr);
1277 str->di_atime_nsec = cpu_to_be32(ip->i_inode.i_atime.tv_nsec); 1277 str->di_atime_nsec = cpu_to_be32(ip->i_inode.i_atime.tv_nsec);
1278 str->di_mtime_nsec = cpu_to_be32(ip->i_inode.i_mtime.tv_nsec); 1278 str->di_mtime_nsec = cpu_to_be32(ip->i_inode.i_mtime.tv_nsec);
1279 str->di_ctime_nsec = cpu_to_be32(ip->i_inode.i_ctime.tv_nsec); 1279 str->di_ctime_nsec = cpu_to_be32(ip->i_inode.i_ctime.tv_nsec);
@@ -1296,7 +1296,7 @@ void gfs2_dinode_print(const struct gfs2_inode *ip)
1296 printk(KERN_INFO " i_height = %u\n", ip->i_height); 1296 printk(KERN_INFO " i_height = %u\n", ip->i_height);
1297 printk(KERN_INFO " i_depth = %u\n", ip->i_depth); 1297 printk(KERN_INFO " i_depth = %u\n", ip->i_depth);
1298 printk(KERN_INFO " i_entries = %u\n", ip->i_entries); 1298 printk(KERN_INFO " i_entries = %u\n", ip->i_entries);
1299 printk(KERN_INFO " di_eattr = %llu\n", 1299 printk(KERN_INFO " i_eattr = %llu\n",
1300 (unsigned long long)di->di_eattr); 1300 (unsigned long long)ip->i_eattr);
1301} 1301}
1302 1302
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c
index 2cb744ba3b77..aee6cbaf58df 100644
--- a/fs/gfs2/ops_super.c
+++ b/fs/gfs2/ops_super.c
@@ -502,7 +502,7 @@ static void gfs2_delete_inode(struct inode *inode)
502 goto out_unlock; 502 goto out_unlock;
503 } 503 }
504 504
505 if (ip->i_di.di_eattr) { 505 if (ip->i_eattr) {
506 error = gfs2_ea_dealloc(ip); 506 error = gfs2_ea_dealloc(ip);
507 if (error) 507 if (error)
508 goto out_unlock; 508 goto out_unlock;