X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=blobdiff_plain;f=fs%2Fbtrfs%2Facl.c;h=a1d7211c88846fa5e4ace5acf01ff4499c309ce4;hp=15e1dfef56a5915a5979c3b74c513a714cc310c6;hb=5ee552da503961e6df785b8495bcfc98eb30eb2a;hpb=77122d6f7477899ba6d1b2d340956bd6fd9ee3b5 diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 15e1dfef56a5..a1d7211c8884 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -30,10 +30,10 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type) name = XATTR_NAME_POSIX_ACL_DEFAULT; break; default: - BUG(); + return ERR_PTR(-EINVAL); } - size = btrfs_getxattr(inode, name, "", 0); + size = btrfs_getxattr(inode, name, NULL, 0); if (size > 0) { value = kzalloc(size, GFP_KERNEL); if (!value) @@ -42,7 +42,7 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type) } if (size > 0) { acl = posix_acl_from_xattr(&init_user_ns, value, size); - } else if (size == -ERANGE || size == -ENODATA || size == 0) { + } else if (size == -ENODATA || size == 0) { acl = NULL; } else { acl = ERR_PTR(-EIO);