mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
ovl: port ovl_nlink_end() to cred guard
Use the scoped ovl cred guard. Link: https://patch.msgid.link/20251117-work-ovl-cred-guard-v4-29-b31603935724@kernel.org Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
062c5b48d2
commit
9e5ec68f3a
|
|
@ -1211,11 +1211,8 @@ void ovl_nlink_end(struct dentry *dentry)
|
|||
ovl_drop_write(dentry);
|
||||
|
||||
if (ovl_test_flag(OVL_INDEX, inode) && inode->i_nlink == 0) {
|
||||
const struct cred *old_cred;
|
||||
|
||||
old_cred = ovl_override_creds(dentry->d_sb);
|
||||
ovl_cleanup_index(dentry);
|
||||
ovl_revert_creds(old_cred);
|
||||
with_ovl_creds(dentry->d_sb)
|
||||
ovl_cleanup_index(dentry);
|
||||
}
|
||||
|
||||
ovl_inode_unlock(inode);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user