diff options
author | Chengguang Xu <cgxu519@gmx.com> | 2018-06-27 00:16:35 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-08-06 07:12:40 -0400 |
commit | 7e35eab958e30d15743b1f9928d15b559a6e432d (patch) | |
tree | 30c1696236fb3b1707a026bcdae8213633f90bed | |
parent | ab3629ed86ec43e7d95cf087d0b5a9d403fcd822 (diff) |
btrfs: replace empty string with NULL when getting attribute length in btrfs_get_acl
In btrfs_get_acl() the first call of btr_getxattr() is for getting the
length of attribute, the value buffer is never used in this case. So
it's better to replace empty string with NULL.
Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/acl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 60f83a3bd77c..83fdd80c51c6 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c | |||
@@ -33,7 +33,7 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type) | |||
33 | return ERR_PTR(-EINVAL); | 33 | return ERR_PTR(-EINVAL); |
34 | } | 34 | } |
35 | 35 | ||
36 | size = btrfs_getxattr(inode, name, "", 0); | 36 | size = btrfs_getxattr(inode, name, NULL, 0); |
37 | if (size > 0) { | 37 | if (size > 0) { |
38 | value = kzalloc(size, GFP_KERNEL); | 38 | value = kzalloc(size, GFP_KERNEL); |
39 | if (!value) | 39 | if (!value) |