ovl: narrow locking on ovl_remove_and_whiteout()
authorNeilBrown <neil@brown.name>
Wed, 16 Jul 2025 00:44:27 +0000 (10:44 +1000)
committerChristian Brauner <brauner@kernel.org>
Fri, 18 Jul 2025 09:10:42 +0000 (11:10 +0200)
commitc69566b1d11d781d6b586113126ce1a803bbf8fc
tree4aa12f188b932ed3841bbc7443dbee90a26724ad
parent241062ae5d8784158d0af5d7b9212c3b53d91ca5
ovl: narrow locking on ovl_remove_and_whiteout()

This code:
  performs a lookup_upper
  creates a whiteout object
  renames the whiteout over the result of the lookup

The create and the rename must be locked separately for proposed
directory locking changes.  This patch takes a first step of moving the
lookup out of the locked region.  A subsequent patch will separate the
create from the rename.

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