int f2fs_set_acl(struct inode *inode, struct posix_acl *acl, int type) { if (unlikely(f2fs_cp_error(F2FS_I_SB(inode)))) return -EIO; return __f2fs_set_acl(inode, type, acl, NULL); }
int f2fs_init_acl(struct inode *inode, struct inode *dir, struct page *ipage) { struct posix_acl *default_acl, *acl; int error = 0; error = posix_acl_create(dir, &inode->i_mode, &default_acl, &acl); if (error) return error; if (default_acl) { error = __f2fs_set_acl(inode, ACL_TYPE_DEFAULT, default_acl, ipage); posix_acl_release(default_acl); } if (acl) { if (error) error = __f2fs_set_acl(inode, ACL_TYPE_ACCESS, acl, ipage); posix_acl_release(acl); } return error; }
int f2fs_set_acl(struct inode *inode, struct posix_acl *acl, int type) { return __f2fs_set_acl(inode, type, acl, NULL); }