aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/xattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/xattr.c')
-rw-r--r--fs/ocfs2/xattr.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 19de5c487242..93aae7953c2e 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -297,7 +297,8 @@ static int ocfs2_xattr_bucket_journal_access(handle_t *handle,
297 int i, rc = 0; 297 int i, rc = 0;
298 298
299 for (i = 0; i < bucket->bu_blocks; i++) { 299 for (i = 0; i < bucket->bu_blocks; i++) {
300 rc = ocfs2_journal_access(handle, bucket->bu_inode, 300 rc = ocfs2_journal_access(handle,
301 INODE_CACHE(bucket->bu_inode),
301 bucket->bu_bhs[i], type); 302 bucket->bu_bhs[i], type);
302 if (rc) { 303 if (rc) {
303 mlog_errno(rc); 304 mlog_errno(rc);
@@ -604,7 +605,7 @@ static int ocfs2_xattr_extend_allocation(struct inode *inode,
604 605
605 ocfs2_init_xattr_value_extent_tree(&et, inode, vb); 606 ocfs2_init_xattr_value_extent_tree(&et, inode, vb);
606 607
607 status = vb->vb_access(handle, inode, vb->vb_bh, 608 status = vb->vb_access(handle, INODE_CACHE(inode), vb->vb_bh,
608 OCFS2_JOURNAL_ACCESS_WRITE); 609 OCFS2_JOURNAL_ACCESS_WRITE);
609 if (status < 0) { 610 if (status < 0) {
610 mlog_errno(status); 611 mlog_errno(status);
@@ -658,7 +659,7 @@ static int __ocfs2_remove_xattr_range(struct inode *inode,
658 659
659 ocfs2_init_xattr_value_extent_tree(&et, inode, vb); 660 ocfs2_init_xattr_value_extent_tree(&et, inode, vb);
660 661
661 ret = vb->vb_access(handle, inode, vb->vb_bh, 662 ret = vb->vb_access(handle, INODE_CACHE(inode), vb->vb_bh,
662 OCFS2_JOURNAL_ACCESS_WRITE); 663 OCFS2_JOURNAL_ACCESS_WRITE);
663 if (ret) { 664 if (ret) {
664 mlog_errno(ret); 665 mlog_errno(ret);
@@ -1217,7 +1218,7 @@ static int __ocfs2_xattr_set_value_outside(struct inode *inode,
1217 } 1218 }
1218 1219
1219 ret = ocfs2_journal_access(handle, 1220 ret = ocfs2_journal_access(handle,
1220 inode, 1221 INODE_CACHE(inode),
1221 bh, 1222 bh,
1222 OCFS2_JOURNAL_ACCESS_WRITE); 1223 OCFS2_JOURNAL_ACCESS_WRITE);
1223 if (ret < 0) { 1224 if (ret < 0) {
@@ -1268,7 +1269,7 @@ static int ocfs2_xattr_cleanup(struct inode *inode,
1268 void *val = xs->base + offs; 1269 void *val = xs->base + offs;
1269 size_t size = OCFS2_XATTR_SIZE(name_len) + OCFS2_XATTR_ROOT_SIZE; 1270 size_t size = OCFS2_XATTR_SIZE(name_len) + OCFS2_XATTR_ROOT_SIZE;
1270 1271
1271 ret = vb->vb_access(handle, inode, vb->vb_bh, 1272 ret = vb->vb_access(handle, INODE_CACHE(inode), vb->vb_bh,
1272 OCFS2_JOURNAL_ACCESS_WRITE); 1273 OCFS2_JOURNAL_ACCESS_WRITE);
1273 if (ret) { 1274 if (ret) {
1274 mlog_errno(ret); 1275 mlog_errno(ret);
@@ -1296,7 +1297,7 @@ static int ocfs2_xattr_update_entry(struct inode *inode,
1296{ 1297{
1297 int ret; 1298 int ret;
1298 1299
1299 ret = vb->vb_access(handle, inode, vb->vb_bh, 1300 ret = vb->vb_access(handle, INODE_CACHE(inode), vb->vb_bh,
1300 OCFS2_JOURNAL_ACCESS_WRITE); 1301 OCFS2_JOURNAL_ACCESS_WRITE);
1301 if (ret) { 1302 if (ret) {
1302 mlog_errno(ret); 1303 mlog_errno(ret);
@@ -1617,7 +1618,7 @@ static int ocfs2_xattr_set_entry(struct inode *inode,
1617 } 1618 }
1618 } 1619 }
1619 1620
1620 ret = ocfs2_journal_access_di(handle, inode, xs->inode_bh, 1621 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), xs->inode_bh,
1621 OCFS2_JOURNAL_ACCESS_WRITE); 1622 OCFS2_JOURNAL_ACCESS_WRITE);
1622 if (ret) { 1623 if (ret) {
1623 mlog_errno(ret); 1624 mlog_errno(ret);
@@ -1625,7 +1626,7 @@ static int ocfs2_xattr_set_entry(struct inode *inode,
1625 } 1626 }
1626 1627
1627 if (!(flag & OCFS2_INLINE_XATTR_FL)) { 1628 if (!(flag & OCFS2_INLINE_XATTR_FL)) {
1628 ret = vb.vb_access(handle, inode, vb.vb_bh, 1629 ret = vb.vb_access(handle, INODE_CACHE(inode), vb.vb_bh,
1629 OCFS2_JOURNAL_ACCESS_WRITE); 1630 OCFS2_JOURNAL_ACCESS_WRITE);
1630 if (ret) { 1631 if (ret) {
1631 mlog_errno(ret); 1632 mlog_errno(ret);
@@ -1898,7 +1899,7 @@ int ocfs2_xattr_remove(struct inode *inode, struct buffer_head *di_bh)
1898 mlog_errno(ret); 1899 mlog_errno(ret);
1899 goto out; 1900 goto out;
1900 } 1901 }
1901 ret = ocfs2_journal_access_di(handle, inode, di_bh, 1902 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh,
1902 OCFS2_JOURNAL_ACCESS_WRITE); 1903 OCFS2_JOURNAL_ACCESS_WRITE);
1903 if (ret) { 1904 if (ret) {
1904 mlog_errno(ret); 1905 mlog_errno(ret);
@@ -2107,7 +2108,8 @@ static int ocfs2_xattr_block_set(struct inode *inode,
2107 int ret; 2108 int ret;
2108 2109
2109 if (!xs->xattr_bh) { 2110 if (!xs->xattr_bh) {
2110 ret = ocfs2_journal_access_di(handle, inode, xs->inode_bh, 2111 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode),
2112 xs->inode_bh,
2111 OCFS2_JOURNAL_ACCESS_CREATE); 2113 OCFS2_JOURNAL_ACCESS_CREATE);
2112 if (ret < 0) { 2114 if (ret < 0) {
2113 mlog_errno(ret); 2115 mlog_errno(ret);
@@ -2125,7 +2127,8 @@ static int ocfs2_xattr_block_set(struct inode *inode,
2125 new_bh = sb_getblk(inode->i_sb, first_blkno); 2127 new_bh = sb_getblk(inode->i_sb, first_blkno);
2126 ocfs2_set_new_buffer_uptodate(INODE_CACHE(inode), new_bh); 2128 ocfs2_set_new_buffer_uptodate(INODE_CACHE(inode), new_bh);
2127 2129
2128 ret = ocfs2_journal_access_xb(handle, inode, new_bh, 2130 ret = ocfs2_journal_access_xb(handle, INODE_CACHE(inode),
2131 new_bh,
2129 OCFS2_JOURNAL_ACCESS_CREATE); 2132 OCFS2_JOURNAL_ACCESS_CREATE);
2130 if (ret < 0) { 2133 if (ret < 0) {
2131 mlog_errno(ret); 2134 mlog_errno(ret);
@@ -2600,7 +2603,7 @@ static int __ocfs2_xattr_set_handle(struct inode *inode,
2600 2603
2601 if (!ret) { 2604 if (!ret) {
2602 /* Update inode ctime. */ 2605 /* Update inode ctime. */
2603 ret = ocfs2_journal_access_di(ctxt->handle, inode, 2606 ret = ocfs2_journal_access_di(ctxt->handle, INODE_CACHE(inode),
2604 xis->inode_bh, 2607 xis->inode_bh,
2605 OCFS2_JOURNAL_ACCESS_WRITE); 2608 OCFS2_JOURNAL_ACCESS_WRITE);
2606 if (ret) { 2609 if (ret) {
@@ -3428,7 +3431,7 @@ static int ocfs2_xattr_create_index_block(struct inode *inode,
3428 */ 3431 */
3429 down_write(&oi->ip_alloc_sem); 3432 down_write(&oi->ip_alloc_sem);
3430 3433
3431 ret = ocfs2_journal_access_xb(handle, inode, xb_bh, 3434 ret = ocfs2_journal_access_xb(handle, INODE_CACHE(inode), xb_bh,
3432 OCFS2_JOURNAL_ACCESS_WRITE); 3435 OCFS2_JOURNAL_ACCESS_WRITE);
3433 if (ret) { 3436 if (ret) {
3434 mlog_errno(ret); 3437 mlog_errno(ret);
@@ -4267,7 +4270,7 @@ static int ocfs2_add_new_xattr_cluster(struct inode *inode,
4267 4270
4268 ocfs2_init_xattr_tree_extent_tree(&et, inode, root_bh); 4271 ocfs2_init_xattr_tree_extent_tree(&et, inode, root_bh);
4269 4272
4270 ret = ocfs2_journal_access_xb(handle, inode, root_bh, 4273 ret = ocfs2_journal_access_xb(handle, INODE_CACHE(inode), root_bh,
4271 OCFS2_JOURNAL_ACCESS_WRITE); 4274 OCFS2_JOURNAL_ACCESS_WRITE);
4272 if (ret < 0) { 4275 if (ret < 0) {
4273 mlog_errno(ret); 4276 mlog_errno(ret);
@@ -4873,7 +4876,7 @@ static int ocfs2_rm_xattr_cluster(struct inode *inode,
4873 goto out; 4876 goto out;
4874 } 4877 }
4875 4878
4876 ret = ocfs2_journal_access_xb(handle, inode, root_bh, 4879 ret = ocfs2_journal_access_xb(handle, INODE_CACHE(inode), root_bh,
4877 OCFS2_JOURNAL_ACCESS_WRITE); 4880 OCFS2_JOURNAL_ACCESS_WRITE);
4878 if (ret) { 4881 if (ret) {
4879 mlog_errno(ret); 4882 mlog_errno(ret);