diff options
author | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2023-02-14 15:06:27 +0400 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2023-03-27 17:44:35 +0400 |
commit | 75c5e0c9e5cad34deeec7c131c2b1368df5a8c75 (patch) | |
tree | 9100a86a0dd78a7703b81973538f374199cf335d /fs/ntfs3/xattr.c | |
parent | 1a6be5fb156a1a7e1c81d30ca4ca48bca99b7ca1 (diff) | |
download | lwn-75c5e0c9e5cad34deeec7c131c2b1368df5a8c75.tar.gz lwn-75c5e0c9e5cad34deeec7c131c2b1368df5a8c75.zip |
fs/ntfs3: Changed ntfs_get_acl() to use dentry
ntfs_get_acl changed to match new interface in struct inode_operations.
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3/xattr.c')
-rw-r--r-- | fs/ntfs3/xattr.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c index 9fbeaa7bbc00..d2746803f032 100644 --- a/fs/ntfs3/xattr.c +++ b/fs/ntfs3/xattr.c @@ -520,9 +520,14 @@ out: } #ifdef CONFIG_NTFS3_FS_POSIX_ACL -static struct posix_acl *ntfs_get_acl_ex(struct inode *inode, int type, - int locked) + +/* + * ntfs_get_acl - inode_operations::get_acl + */ +struct posix_acl *ntfs_get_acl(struct mnt_idmap *idmap, + struct dentry *dentry, int type) { + struct inode *inode = d_inode(dentry); struct ntfs_inode *ni = ntfs_i(inode); const char *name; size_t name_len; @@ -545,13 +550,11 @@ static struct posix_acl *ntfs_get_acl_ex(struct inode *inode, int type, name_len = sizeof(XATTR_NAME_POSIX_ACL_DEFAULT) - 1; } - if (!locked) - ni_lock(ni); + ni_lock(ni); err = ntfs_get_ea(inode, name, name_len, buf, PATH_MAX, &req); - if (!locked) - ni_unlock(ni); + ni_unlock(ni); /* Translate extended attribute to acl. */ if (err >= 0) { @@ -570,17 +573,6 @@ static struct posix_acl *ntfs_get_acl_ex(struct inode *inode, int type, return acl; } -/* - * ntfs_get_acl - inode_operations::get_acl - */ -struct posix_acl *ntfs_get_acl(struct inode *inode, int type, bool rcu) -{ - if (rcu) - return ERR_PTR(-ECHILD); - - return ntfs_get_acl_ex(inode, type, 0); -} - static noinline int ntfs_set_acl_ex(struct mnt_idmap *idmap, struct inode *inode, struct posix_acl *acl, int type, bool init_acl) |