Commit 84008972 authored by Joel Becker's avatar Joel Becker Committed by Mark Fasheh

ocfs2: Use proper journal_access function in xattr.c

Change the rest of the naked ocfs2_journal_access() calls in
fs/ocfs2/xattr.c to use the appropriate ocfs2_journal_access_*() call
for their metadata type.
Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent 4311901d
...@@ -1894,8 +1894,8 @@ int ocfs2_xattr_remove(struct inode *inode, struct buffer_head *di_bh) ...@@ -1894,8 +1894,8 @@ int ocfs2_xattr_remove(struct inode *inode, struct buffer_head *di_bh)
mlog_errno(ret); mlog_errno(ret);
goto out; goto out;
} }
ret = ocfs2_journal_access(handle, inode, di_bh, ret = ocfs2_journal_access_di(handle, inode, di_bh,
OCFS2_JOURNAL_ACCESS_WRITE); OCFS2_JOURNAL_ACCESS_WRITE);
if (ret) { if (ret) {
mlog_errno(ret); mlog_errno(ret);
goto out_commit; goto out_commit;
...@@ -2103,8 +2103,8 @@ static int ocfs2_xattr_block_set(struct inode *inode, ...@@ -2103,8 +2103,8 @@ static int ocfs2_xattr_block_set(struct inode *inode,
int ret; int ret;
if (!xs->xattr_bh) { if (!xs->xattr_bh) {
ret = ocfs2_journal_access(handle, inode, xs->inode_bh, ret = ocfs2_journal_access_di(handle, inode, xs->inode_bh,
OCFS2_JOURNAL_ACCESS_CREATE); OCFS2_JOURNAL_ACCESS_CREATE);
if (ret < 0) { if (ret < 0) {
mlog_errno(ret); mlog_errno(ret);
goto end; goto end;
...@@ -2121,8 +2121,8 @@ static int ocfs2_xattr_block_set(struct inode *inode, ...@@ -2121,8 +2121,8 @@ static int ocfs2_xattr_block_set(struct inode *inode,
new_bh = sb_getblk(inode->i_sb, first_blkno); new_bh = sb_getblk(inode->i_sb, first_blkno);
ocfs2_set_new_buffer_uptodate(inode, new_bh); ocfs2_set_new_buffer_uptodate(inode, new_bh);
ret = ocfs2_journal_access(handle, inode, new_bh, ret = ocfs2_journal_access_xb(handle, inode, new_bh,
OCFS2_JOURNAL_ACCESS_CREATE); OCFS2_JOURNAL_ACCESS_CREATE);
if (ret < 0) { if (ret < 0) {
mlog_errno(ret); mlog_errno(ret);
goto end; goto end;
...@@ -3377,8 +3377,8 @@ static int ocfs2_xattr_create_index_block(struct inode *inode, ...@@ -3377,8 +3377,8 @@ static int ocfs2_xattr_create_index_block(struct inode *inode,
*/ */
down_write(&oi->ip_alloc_sem); down_write(&oi->ip_alloc_sem);
ret = ocfs2_journal_access(handle, inode, xb_bh, ret = ocfs2_journal_access_xb(handle, inode, xb_bh,
OCFS2_JOURNAL_ACCESS_WRITE); OCFS2_JOURNAL_ACCESS_WRITE);
if (ret) { if (ret) {
mlog_errno(ret); mlog_errno(ret);
goto out; goto out;
...@@ -4216,8 +4216,8 @@ static int ocfs2_add_new_xattr_cluster(struct inode *inode, ...@@ -4216,8 +4216,8 @@ static int ocfs2_add_new_xattr_cluster(struct inode *inode,
ocfs2_init_xattr_tree_extent_tree(&et, inode, root_bh); ocfs2_init_xattr_tree_extent_tree(&et, inode, root_bh);
ret = ocfs2_journal_access(handle, inode, root_bh, ret = ocfs2_journal_access_xb(handle, inode, root_bh,
OCFS2_JOURNAL_ACCESS_WRITE); OCFS2_JOURNAL_ACCESS_WRITE);
if (ret < 0) { if (ret < 0) {
mlog_errno(ret); mlog_errno(ret);
goto leave; goto leave;
...@@ -4808,8 +4808,8 @@ static int ocfs2_rm_xattr_cluster(struct inode *inode, ...@@ -4808,8 +4808,8 @@ static int ocfs2_rm_xattr_cluster(struct inode *inode,
goto out; goto out;
} }
ret = ocfs2_journal_access(handle, inode, root_bh, ret = ocfs2_journal_access_xb(handle, inode, root_bh,
OCFS2_JOURNAL_ACCESS_WRITE); OCFS2_JOURNAL_ACCESS_WRITE);
if (ret) { if (ret) {
mlog_errno(ret); mlog_errno(ret);
goto out_commit; goto out_commit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment