Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132296
b: refs/heads/master
c: 712e53e
h: refs/heads/master
v: v3
  • Loading branch information
Tao Ma authored and Mark Fasheh committed Mar 12, 2009
1 parent 36bc08c commit c2067ed
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 74e77eb30d0ecbb12964d005b439c8b84a505b84
refs/heads/master: 712e53e46a1da35fcd88c05aa0c675b10f7c0e9d
26 changes: 20 additions & 6 deletions trunk/fs/ocfs2/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -4795,19 +4795,33 @@ static int ocfs2_xattr_bucket_set_value_outside(struct inode *inode,
char *val,
int value_len)
{
int offset;
int ret, offset, block_off;
struct ocfs2_xattr_value_root *xv;
struct ocfs2_xattr_entry *xe = xs->here;
struct ocfs2_xattr_header *xh = bucket_xh(xs->bucket);
void *base;

BUG_ON(!xs->base || !xe || ocfs2_xattr_is_local(xe));

offset = le16_to_cpu(xe->xe_name_offset) +
OCFS2_XATTR_SIZE(xe->xe_name_len);
ret = ocfs2_xattr_bucket_get_name_value(inode, xh,
xe - xh->xh_entries,
&block_off,
&offset);
if (ret) {
mlog_errno(ret);
goto out;
}

xv = (struct ocfs2_xattr_value_root *)(xs->base + offset);
base = bucket_block(xs->bucket, block_off);
xv = (struct ocfs2_xattr_value_root *)(base + offset +
OCFS2_XATTR_SIZE(xe->xe_name_len));

return __ocfs2_xattr_set_value_outside(inode, handle,
xv, val, value_len);
ret = __ocfs2_xattr_set_value_outside(inode, handle,
xv, val, value_len);
if (ret)
mlog_errno(ret);
out:
return ret;
}

static int ocfs2_rm_xattr_cluster(struct inode *inode,
Expand Down

0 comments on commit c2067ed

Please sign in to comment.