aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/xattr.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-12-09 18:46:15 -0500
committerMark Fasheh <mfasheh@suse.com>2009-01-05 11:40:33 -0500
commit0c748e95327d00e9eb19d0f34b32147ecbc02137 (patch)
tree25a5a4e27bcceaf11c70dedfc3fe476c16c73346 /fs/ocfs2/xattr.c
parentb3e5d37905730dc5ddff717f55ed830caa80ea0e (diff)
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: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/xattr.c')
-rw-r--r--fs/ocfs2/xattr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 409f9eeec703..6a056122771d 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1282,12 +1282,13 @@ static int ocfs2_xattr_update_entry(struct inode *inode,
1282 handle_t *handle, 1282 handle_t *handle,
1283 struct ocfs2_xattr_info *xi, 1283 struct ocfs2_xattr_info *xi,
1284 struct ocfs2_xattr_search *xs, 1284 struct ocfs2_xattr_search *xs,
1285 struct ocfs2_xattr_value_buf *vb,
1285 size_t offs) 1286 size_t offs)
1286{ 1287{
1287 int ret; 1288 int ret;
1288 1289
1289 ret = ocfs2_journal_access(handle, inode, xs->xattr_bh, 1290 ret = vb->vb_access(handle, inode, vb->vb_bh,
1290 OCFS2_JOURNAL_ACCESS_WRITE); 1291 OCFS2_JOURNAL_ACCESS_WRITE);
1291 if (ret) { 1292 if (ret) {
1292 mlog_errno(ret); 1293 mlog_errno(ret);
1293 goto out; 1294 goto out;
@@ -1301,7 +1302,7 @@ static int ocfs2_xattr_update_entry(struct inode *inode,
1301 ocfs2_xattr_set_local(xs->here, 0); 1302 ocfs2_xattr_set_local(xs->here, 0);
1302 ocfs2_xattr_hash_entry(inode, xs->header, xs->here); 1303 ocfs2_xattr_hash_entry(inode, xs->header, xs->here);
1303 1304
1304 ret = ocfs2_journal_dirty(handle, xs->xattr_bh); 1305 ret = ocfs2_journal_dirty(handle, vb->vb_bh);
1305 if (ret < 0) 1306 if (ret < 0)
1306 mlog_errno(ret); 1307 mlog_errno(ret);
1307out: 1308out:
@@ -1345,7 +1346,7 @@ static int ocfs2_xattr_set_value_outside(struct inode *inode,
1345 mlog_errno(ret); 1346 mlog_errno(ret);
1346 return ret; 1347 return ret;
1347 } 1348 }
1348 ret = ocfs2_xattr_update_entry(inode, ctxt->handle, xi, xs, offs); 1349 ret = ocfs2_xattr_update_entry(inode, ctxt->handle, xi, xs, &vb, offs);
1349 if (ret < 0) { 1350 if (ret < 0) {
1350 mlog_errno(ret); 1351 mlog_errno(ret);
1351 return ret; 1352 return ret;
@@ -1574,6 +1575,7 @@ static int ocfs2_xattr_set_entry(struct inode *inode,
1574 handle, 1575 handle,
1575 xi, 1576 xi,
1576 xs, 1577 xs,
1578 &vb,
1577 offs); 1579 offs);
1578 if (ret < 0) { 1580 if (ret < 0) {
1579 mlog_errno(ret); 1581 mlog_errno(ret);