diff options
-rw-r--r-- | fs/btrfs/acl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 6ef7b26724ec..6b4d0cca5c7f 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c | |||
@@ -160,6 +160,9 @@ static int btrfs_xattr_acl_set(struct dentry *dentry, const char *name, | |||
160 | int ret; | 160 | int ret; |
161 | struct posix_acl *acl = NULL; | 161 | struct posix_acl *acl = NULL; |
162 | 162 | ||
163 | if (!is_owner_or_cap(dentry->d_inode)) | ||
164 | return -EPERM; | ||
165 | |||
163 | if (value) { | 166 | if (value) { |
164 | acl = posix_acl_from_xattr(value, size); | 167 | acl = posix_acl_from_xattr(value, size); |
165 | if (acl == NULL) { | 168 | if (acl == NULL) { |