diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-10-15 00:14:01 (GMT) |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-10-15 00:14:01 (GMT) |
commit | 07aaae44f5a3962c3a410a6dd7936dfa7dece2b9 (patch) | |
tree | 0cdb5735800ddd63d8850aa26d3a3f1f3334267a /fs/btrfs/xattr.c | |
parent | 07a062140372187642003e02a49edc8a2115c1ca (diff) | |
parent | 976d167615b64e14bc1491ca51d424e2ba9a5e84 (diff) | |
download | linux-07aaae44f5a3962c3a410a6dd7936dfa7dece2b9.tar.xz |
Merge commit 'v3.1-rc9' into fbdev-next
Diffstat (limited to 'fs/btrfs/xattr.c')
-rw-r--r-- | fs/btrfs/xattr.c | 9 |
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) |