ovl: port do_ovl_get_acl() to cred guard

Use the scoped ovl cred guard.

Link: https://patch.msgid.link/20251117-work-ovl-cred-guard-v4-17-b31603935724@kernel.org
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Christian Brauner
2025-11-17 10:33:48 +01:00
parent 47eba7f7fd
commit 71ac28fbcd

View File

@@ -459,11 +459,8 @@ struct posix_acl *do_ovl_get_acl(struct mnt_idmap *idmap,
acl = get_cached_acl_rcu(realinode, type);
} else {
const struct cred *old_cred;
old_cred = ovl_override_creds(inode->i_sb);
acl = ovl_get_acl_path(&realpath, posix_acl_xattr_name(type), noperm);
ovl_revert_creds(old_cred);
with_ovl_creds(inode->i_sb)
acl = ovl_get_acl_path(&realpath, posix_acl_xattr_name(type), noperm);
}
return acl;