mirror of https://github.com/torvalds/linux.git
ovl: port ovl_listxattr() to cred guard
Use the scoped ovl cred guard. Link: https://patch.msgid.link/20251117-work-ovl-cred-guard-v4-32-b31603935724@kernel.org Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
ae64b54185
commit
0b5800172c
|
|
@ -109,12 +109,10 @@ ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size)
|
|||
ssize_t res;
|
||||
size_t len;
|
||||
char *s;
|
||||
const struct cred *old_cred;
|
||||
size_t prefix_len, name_len;
|
||||
|
||||
old_cred = ovl_override_creds(dentry->d_sb);
|
||||
with_ovl_creds(dentry->d_sb)
|
||||
res = vfs_listxattr(realdentry, list, size);
|
||||
ovl_revert_creds(old_cred);
|
||||
if (res <= 0 || size == 0)
|
||||
return res;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue