mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
ovl: narrow the locked region in ovl_copy_up_workdir()
In ovl_copy_up_workdir() unlock immediately after the rename. There is nothing else in the function that needs the lock. Signed-off-by: NeilBrown <neil@brown.name> Link: https://lore.kernel.org/20250716004725.1206467-5-neil@brown.name Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
d2c995581c
commit
a735bdf0b7
|
|
@ -829,9 +829,10 @@ static int ovl_copy_up_workdir(struct ovl_copy_up_ctx *c)
|
|||
goto cleanup;
|
||||
|
||||
err = ovl_do_rename(ofs, c->workdir, temp, c->destdir, upper, 0);
|
||||
unlock_rename(c->workdir, c->destdir);
|
||||
dput(upper);
|
||||
if (err)
|
||||
goto cleanup;
|
||||
goto cleanup_unlocked;
|
||||
|
||||
inode = d_inode(c->dentry);
|
||||
if (c->metacopy_digest)
|
||||
|
|
@ -845,7 +846,6 @@ static int ovl_copy_up_workdir(struct ovl_copy_up_ctx *c)
|
|||
ovl_inode_update(inode, temp);
|
||||
if (S_ISDIR(inode->i_mode))
|
||||
ovl_set_flag(OVL_WHITEOUTS, inode);
|
||||
unlock_rename(c->workdir, c->destdir);
|
||||
out:
|
||||
ovl_end_write(c->dentry);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user