mirror of https://github.com/torvalds/linux.git
ovl: port ovl_check_empty_dir() to cred guard
Use the scoped ovl cred guard. Link: https://patch.msgid.link/20251117-work-ovl-cred-guard-v4-27-b31603935724@kernel.org Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
5517646e14
commit
67bc75e6f4
|
|
@ -1077,11 +1077,9 @@ int ovl_check_empty_dir(struct dentry *dentry, struct list_head *list)
|
|||
int err;
|
||||
struct ovl_cache_entry *p, *n;
|
||||
struct rb_root root = RB_ROOT;
|
||||
const struct cred *old_cred;
|
||||
|
||||
old_cred = ovl_override_creds(dentry->d_sb);
|
||||
with_ovl_creds(dentry->d_sb)
|
||||
err = ovl_dir_read_merged(dentry, list, &root);
|
||||
ovl_revert_creds(old_cred);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue