diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2011-10-20 18:30:25 +0200 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2011-10-20 18:30:25 +0200 |
| commit | 995a0605a6665858d73f9e80053414909be33f27 (patch) | |
| tree | fcc66a6a77acdaae492f77c0c58c0233db74a2b4 /fs/btrfs/xattr.c | |
| parent | a32750c2ca6f697903b19063fc86f4272865e3a1 (diff) | |
| parent | 677d3e2f07d1b3d6d2f76fd5552d16a53b9236a0 (diff) | |
Merge branch 'at91/trng' into next/driver
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 d733b9cfea34..69565e5fc6a0 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) |
