diff options
Diffstat (limited to 'fs/gfs2/eattr.c')
-rw-r--r-- | fs/gfs2/eattr.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c index e3f76f451b0a..0d1c76d906ae 100644 --- a/fs/gfs2/eattr.c +++ b/fs/gfs2/eattr.c | |||
@@ -114,11 +114,11 @@ 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 | ||
121 | if (!(ip->i_di.di_flags & GFS2_DIF_EA_INDIRECT)) { | 121 | if (!(ip->i_diskflags & GFS2_DIF_EA_INDIRECT)) { |
122 | error = ea_foreach_i(ip, bh, ea_call, data); | 122 | error = ea_foreach_i(ip, bh, ea_call, data); |
123 | goto out; | 123 | goto out; |
124 | } | 124 | } |
@@ -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); |
@@ -935,10 +935,10 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er, | |||
935 | int error; | 935 | int error; |
936 | int mh_size = sizeof(struct gfs2_meta_header); | 936 | int mh_size = sizeof(struct gfs2_meta_header); |
937 | 937 | ||
938 | if (ip->i_di.di_flags & GFS2_DIF_EA_INDIRECT) { | 938 | if (ip->i_diskflags & 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,9 +972,9 @@ 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_diskflags |= GFS2_DIF_EA_INDIRECT; |
978 | gfs2_add_inode_blocks(&ip->i_inode, 1); | 978 | gfs2_add_inode_blocks(&ip->i_inode, 1); |
979 | 979 | ||
980 | eablk++; | 980 | eablk++; |
@@ -1015,7 +1015,7 @@ static int ea_set_i(struct gfs2_inode *ip, struct gfs2_ea_request *er, | |||
1015 | if (error) | 1015 | if (error) |
1016 | return error; | 1016 | return error; |
1017 | 1017 | ||
1018 | if (!(ip->i_di.di_flags & GFS2_DIF_EA_INDIRECT)) | 1018 | if (!(ip->i_diskflags & GFS2_DIF_EA_INDIRECT)) |
1019 | blks++; | 1019 | blks++; |
1020 | if (GFS2_EAREQ_SIZE_STUFFED(er) > GFS2_SB(&ip->i_inode)->sd_jbsize) | 1020 | if (GFS2_EAREQ_SIZE_STUFFED(er) > GFS2_SB(&ip->i_inode)->sd_jbsize) |
1021 | blks += DIV_ROUND_UP(er->er_data_len, GFS2_SB(&ip->i_inode)->sd_jbsize); | 1021 | blks += DIV_ROUND_UP(er->er_data_len, GFS2_SB(&ip->i_inode)->sd_jbsize); |
@@ -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); |
@@ -1051,7 +1051,7 @@ int gfs2_ea_set_i(struct gfs2_inode *ip, struct gfs2_ea_request *er) | |||
1051 | return error; | 1051 | return error; |
1052 | 1052 | ||
1053 | if (el.el_ea) { | 1053 | if (el.el_ea) { |
1054 | if (ip->i_di.di_flags & GFS2_DIF_APPENDONLY) { | 1054 | if (ip->i_diskflags & GFS2_DIF_APPENDONLY) { |
1055 | brelse(el.el_bh); | 1055 | brelse(el.el_bh); |
1056 | return -EPERM; | 1056 | return -EPERM; |
1057 | } | 1057 | } |
@@ -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 | ||
@@ -1388,7 +1388,7 @@ static int ea_dealloc_indirect(struct gfs2_inode *ip) | |||
1388 | if (bstart) | 1388 | if (bstart) |
1389 | gfs2_free_meta(ip, bstart, blen); | 1389 | gfs2_free_meta(ip, bstart, blen); |
1390 | 1390 | ||
1391 | ip->i_di.di_flags &= ~GFS2_DIF_EA_INDIRECT; | 1391 | ip->i_diskflags &= ~GFS2_DIF_EA_INDIRECT; |
1392 | 1392 | ||
1393 | error = gfs2_meta_inode_buffer(ip, &dibh); | 1393 | error = gfs2_meta_inode_buffer(ip, &dibh); |
1394 | if (!error) { | 1394 | if (!error) { |
@@ -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); |
@@ -1479,7 +1479,7 @@ int gfs2_ea_dealloc(struct gfs2_inode *ip) | |||
1479 | if (error) | 1479 | if (error) |
1480 | goto out_rindex; | 1480 | goto out_rindex; |
1481 | 1481 | ||
1482 | if (ip->i_di.di_flags & GFS2_DIF_EA_INDIRECT) { | 1482 | if (ip->i_diskflags & GFS2_DIF_EA_INDIRECT) { |
1483 | error = ea_dealloc_indirect(ip); | 1483 | error = ea_dealloc_indirect(ip); |
1484 | if (error) | 1484 | if (error) |
1485 | goto out_rindex; | 1485 | goto out_rindex; |