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
639 * 2: child/target639 * 2: child/target
640 * 3: xattr640 * 3: xattr
641 * 4: second non-directory641 * 4: second non-directory
642 * The last is for certain operations (such as rename) which lock two642 * 5: second parent (when locking independent directories in rename)
643 *
644 * I_MUTEX_NONDIR2 is for certain operations (such as rename) which lock two
643 * non-directories at once.645 * non-directories at once.
644 *646 *
645 * The locking order between these classes is647 * The locking order between these classes is
646 * parent -> child -> normal -> xattr -> second non-directory648 * parent[2] -> child -> grandchild -> normal -> xattr -> second non-directory
647 */649 */
648enum inode_i_mutex_lock_class650enum inode_i_mutex_lock_class
649{651{
@@ -651,7 +653,8 @@ enum inode_i_mutex_lock_class · 1 unmodified line
651 I_MUTEX_PARENT,653 I_MUTEX_PARENT,
652 I_MUTEX_CHILD,654 I_MUTEX_CHILD,
653 I_MUTEX_XATTR,655 I_MUTEX_XATTR,
654 I_MUTEX_NONDIR2656 I_MUTEX_NONDIR2,
657 I_MUTEX_PARENT2,
655};658};
656 659
657void lock_two_nondirectories(struct inode *, struct inode*);660void 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