]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/btrfs/acl.c
Btrfs: prohibit a operation of changing acl's mask when noacl mount option used
[net-next-2.6.git] / fs / btrfs / acl.c
index 6b4d0cca5c7f03d7a747ec6352ce2838e009a3f9..a372985b3a9a2a7b31115d95258d3f4b1609af70 100644 (file)
@@ -163,6 +163,9 @@ static int btrfs_xattr_acl_set(struct dentry *dentry, const char *name,
        if (!is_owner_or_cap(dentry->d_inode))
                return -EPERM;
 
+       if (!IS_POSIXACL(dentry->d_inode))
+               return -EOPNOTSUPP;
+
        if (value) {
                acl = posix_acl_from_xattr(value, size);
                if (acl == NULL) {