]> git.ipfire.org Git - thirdparty/linux.git/commit
ovl: narrow locking in ovl_create_upper()
authorNeilBrown <neil@brown.name>
Wed, 16 Jul 2025 00:44:16 +0000 (10:44 +1000)
committerChristian Brauner <brauner@kernel.org>
Fri, 18 Jul 2025 09:10:41 +0000 (11:10 +0200)
commita07052e07b67add56328b547ce4459878618334d
tree7f14f7ce21d3b797df2ae319f9de25e00c48a0c9
parenta735bdf0b78528970f169870ced234dd3a33ea7b
ovl: narrow locking in ovl_create_upper()

Drop the directory lock immediately after the ovl_create_real() call and
take a separate lock later for cleanup in ovl_cleanup_unlocked() - if
needed.

This makes way for future changes where locks are taken on individual
dentries rather than the whole directory.

Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: NeilBrown <neil@brown.name>
Link: https://lore.kernel.org/20250716004725.1206467-6-neil@brown.name
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/overlayfs/dir.c