]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ovl: fix comment about locking order
authorAmir Goldstein <amir73il@gmail.com>
Tue, 9 Jun 2026 18:46:56 +0000 (20:46 +0200)
committerChristian Brauner <brauner@kernel.org>
Wed, 1 Jul 2026 13:26:25 +0000 (15:26 +0200)
Forgot to update the comment when we changed the locking order.

Fixes: 162d06444070c ("ovl: reorder ovl_want_write() after ovl_inode_lock()")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://patch.msgid.link/20260609184656.1916631-1-amir73il@gmail.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/overlayfs/inode.c

index 00c69707bda9846d8d8b9b7647f4135f0aa953ca..bc71231cad532ef6b21f38e2769bc657338aab22 100644 (file)
@@ -783,8 +783,8 @@ static const struct address_space_operations ovl_aops = {
  *
  * This chain is valid:
  * - inode->i_rwsem                    (inode_lock[2])
- * - upper_mnt->mnt_sb->s_writers      (ovl_want_write[0])
  * - OVL_I(inode)->lock                        (ovl_inode_lock[2])
+ * - upper_mnt->mnt_sb->s_writers      (ovl_want_write[0])
  * - OVL_I(lowerinode)->lock           (ovl_inode_lock[1])
  *
  * And this chain is valid:
@@ -797,8 +797,8 @@ static const struct address_space_operations ovl_aops = {
  * held, because it is in reverse order of the non-nested case using the same
  * upper fs:
  * - inode->i_rwsem                    (inode_lock[1])
- * - upper_mnt->mnt_sb->s_writers      (ovl_want_write[0])
  * - OVL_I(inode)->lock                        (ovl_inode_lock[1])
+ * - upper_mnt->mnt_sb->s_writers      (ovl_want_write[0])
  */
 #define OVL_MAX_NESTING FILESYSTEM_MAX_STACK_DEPTH