summaryrefslogtreecommitdiff
path: root/fs/btrfs/xattr.c
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-10-15 00:14:01 (GMT)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-10-15 00:14:01 (GMT)
commit07aaae44f5a3962c3a410a6dd7936dfa7dece2b9 (patch)
tree0cdb5735800ddd63d8850aa26d3a3f1f3334267a /fs/btrfs/xattr.c
parent07a062140372187642003e02a49edc8a2115c1ca (diff)
parent976d167615b64e14bc1491ca51d424e2ba9a5e84 (diff)
downloadlinux-07aaae44f5a3962c3a410a6dd7936dfa7dece2b9.tar.xz
Merge commit 'v3.1-rc9' into fbdev-next
Diffstat (limited to 'fs/btrfs/xattr.c')
-rw-r--r--fs/btrfs/xattr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
index d733b9c..69565e5 100644
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@ -116,6 +116,12 @@ static int do_setxattr(struct btrfs_trans_handle *trans,
if (ret)
goto out;
btrfs_release_path(path);
+
+ /*
+ * remove the attribute
+ */
+ if (!value)
+ goto out;
}
again:
@@ -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)