Commit 0c748e95 authored by Joel Becker's avatar Joel Becker Committed by Mark Fasheh

ocfs2: Pass value buf to ocfs2_xattr_update_entry().

ocfs2_xattr_update_entry() updates the entry portion of an xattr buffer.
This can be part of multiple metadata block types, so pass the buffer in
via an ocfs2_xattr_value_buf.
Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent b3e5d379
...@@ -1282,12 +1282,13 @@ static int ocfs2_xattr_update_entry(struct inode *inode, ...@@ -1282,12 +1282,13 @@ static int ocfs2_xattr_update_entry(struct inode *inode,
handle_t *handle, handle_t *handle,
struct ocfs2_xattr_info *xi, struct ocfs2_xattr_info *xi,
struct ocfs2_xattr_search *xs, struct ocfs2_xattr_search *xs,
struct ocfs2_xattr_value_buf *vb,
size_t offs) size_t offs)
{ {
int ret; int ret;
ret = ocfs2_journal_access(handle, inode, xs->xattr_bh, ret = vb->vb_access(handle, inode, vb->vb_bh,
OCFS2_JOURNAL_ACCESS_WRITE); OCFS2_JOURNAL_ACCESS_WRITE);
if (ret) { if (ret) {
mlog_errno(ret); mlog_errno(ret);
goto out; goto out;
...@@ -1301,7 +1302,7 @@ static int ocfs2_xattr_update_entry(struct inode *inode, ...@@ -1301,7 +1302,7 @@ static int ocfs2_xattr_update_entry(struct inode *inode,
ocfs2_xattr_set_local(xs->here, 0); ocfs2_xattr_set_local(xs->here, 0);
ocfs2_xattr_hash_entry(inode, xs->header, xs->here); ocfs2_xattr_hash_entry(inode, xs->header, xs->here);
ret = ocfs2_journal_dirty(handle, xs->xattr_bh); ret = ocfs2_journal_dirty(handle, vb->vb_bh);
if (ret < 0) if (ret < 0)
mlog_errno(ret); mlog_errno(ret);
out: out:
...@@ -1345,7 +1346,7 @@ static int ocfs2_xattr_set_value_outside(struct inode *inode, ...@@ -1345,7 +1346,7 @@ static int ocfs2_xattr_set_value_outside(struct inode *inode,
mlog_errno(ret); mlog_errno(ret);
return ret; return ret;
} }
ret = ocfs2_xattr_update_entry(inode, ctxt->handle, xi, xs, offs); ret = ocfs2_xattr_update_entry(inode, ctxt->handle, xi, xs, &vb, offs);
if (ret < 0) { if (ret < 0) {
mlog_errno(ret); mlog_errno(ret);
return ret; return ret;
...@@ -1574,6 +1575,7 @@ static int ocfs2_xattr_set_entry(struct inode *inode, ...@@ -1574,6 +1575,7 @@ static int ocfs2_xattr_set_entry(struct inode *inode,
handle, handle,
xi, xi,
xs, xs,
&vb,
offs); offs);
if (ret < 0) { if (ret < 0) {
mlog_errno(ret); mlog_errno(ret);
......
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