History

overlayfs: fix lockdep misannotation

In an overlay directory that shadows an empty lower directory, say /mnt/a/empty102, do: touch /mnt/a/empty102/x unlink /mnt/a/empty102/x rmdir /mnt/a/empty102 It's actually harmless, but needs another level of nesting between I_MUTEX_CHILD and I_MUTEX_NORMAL.

Miklos Szeredi committed 12 years ago

Commit d1b72cc1 parent c2096533 files · +8 −5Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/fs.h+6−3
@@ -639,11 +639,13 @@ static inline int inode_unhashed(struct inode *inode) · 638 unmodified lines
639639 * 2: child/target
640640 * 3: xattr
641641 * 4: second non-directory
642− * The last is for certain operations (such as rename) which lock two
642+ * 5: second parent (when locking independent directories in rename)
643+ *
644+ * I_MUTEX_NONDIR2 is for certain operations (such as rename) which lock two
643645 * non-directories at once.
644646 *
645647 * The locking order between these classes is
646− * parent -> child -> normal -> xattr -> second non-directory
648+ * parent[2] -> child -> grandchild -> normal -> xattr -> second non-directory
647649 */
648650 enum inode_i_mutex_lock_class
649651 {
@@ -651,7 +653,8 @@ enum inode_i_mutex_lock_class · 1 unmodified line
651653 I_MUTEX_PARENT,
652654 I_MUTEX_CHILD,
653655 I_MUTEX_XATTR,
654− I_MUTEX_NONDIR2
656+ I_MUTEX_NONDIR2,
657+ I_MUTEX_PARENT2,
655658 };
656659
657660 void lock_two_nondirectories(struct inode *, struct inode*);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t