--- /dev/null
-int btrfs_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
+ /* SPDX-License-Identifier: GPL-2.0 */
+
+ #ifndef BTRFS_ACL_H
+ #define BTRFS_ACL_H
+
+ #ifdef CONFIG_BTRFS_FS_POSIX_ACL
+
+ struct posix_acl *btrfs_get_acl(struct inode *inode, int type, bool rcu);
++int btrfs_set_acl(struct user_namespace *mnt_userns, struct dentry *dentry,
+ struct posix_acl *acl, int type);
+ int __btrfs_set_acl(struct btrfs_trans_handle *trans, struct inode *inode,
+ struct posix_acl *acl, int type);
+
+ #else
+
+ #define btrfs_get_acl NULL
+ #define btrfs_set_acl NULL
+ static inline int __btrfs_set_acl(struct btrfs_trans_handle *trans,
+ struct inode *inode, struct posix_acl *acl,
+ int type)
+ {
+ return -EOPNOTSUPP;
+ }
+
+ #endif
+
+ #endif
if (attr->ia_valid) {
setattr_copy(mnt_userns, inode, attr);
inode_inc_iversion(inode);
- err = btrfs_dirty_inode(inode);
+ err = btrfs_dirty_inode(BTRFS_I(inode));
if (!err && attr->ia_valid & ATTR_MODE)
- err = posix_acl_chmod(mnt_userns, inode, inode->i_mode);
+ err = posix_acl_chmod(mnt_userns, dentry, inode->i_mode);
}
return err;