Commit 4815053a authored by David Sterba's avatar David Sterba Committed by Chris Mason

btrfs: xattr: fix attribute removal

An attribute is not removed by 'setfattr -x attr file' and remains
visible in attr list. This makes xfstests/062 pass again.
Signed-off-by: default avatarDavid Sterba <>
Signed-off-by: default avatarChris Mason <>
parent a39f7521
......@@ -116,6 +116,12 @@ static int do_setxattr(struct btrfs_trans_handle *trans,
if (ret)
goto out;
* remove the attribute
if (!value)
goto out;
......@@ -158,6 +164,9 @@ out:
return ret;
* @value: "" makes the attribute to empty, NULL removes it
int __btrfs_setxattr(struct btrfs_trans_handle *trans,
struct inode *inode, const char *name,
const void *value, size_t size, int flags)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment