mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user