Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274647
b: refs/heads/master
c: ed3ee9f
h: refs/heads/master
i:
  274645: d3d745c
  274643: 9ef2d88
  274639: 7a43423
v: v3
  • Loading branch information
Josef Bacik committed Oct 19, 2011
1 parent 97d6b7b commit 02519d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e70bea5fe0e3d6355fd95674eaff5aa5a32f0564
refs/heads/master: ed3ee9f44ba55eb6acfbfc8caa881e0253710d2a
11 changes: 11 additions & 0 deletions trunk/fs/btrfs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,17 @@ static int do_setxattr(struct btrfs_trans_handle *trans,
again:
ret = btrfs_insert_xattr_item(trans, root, path, btrfs_ino(inode),
name, name_len, value, size);
/*
* If we're setting an xattr to a new value but the new value is say
* exactly BTRFS_MAX_XATTR_SIZE, we could end up with EOVERFLOW getting
* back from split_leaf. This is because it thinks we'll be extending
* the existing item size, but we're asking for enough space to add the
* item itself. So if we get EOVERFLOW just set ret to EEXIST and let
* the rest of the function figure it out.
*/
if (ret == -EOVERFLOW)
ret = -EEXIST;

if (ret == -EEXIST) {
if (flags & XATTR_CREATE)
goto out;
Expand Down

0 comments on commit 02519d4

Please sign in to comment.