btrfs: replace empty string with NULL when getting attribute length in btrfs_get_acl
[sfrench/cifs-2.6.git] / fs / btrfs / acl.c
index 15e1dfef56a5915a5979c3b74c513a714cc310c6..83fdd80c51c659ed6f3945dfd1742c2774fafde9 100644 (file)
@@ -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)