mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Tested-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
c2096537d4
commit
d1b72cc6d8
3 changed files with 8 additions and 5 deletions
|
@ -639,11 +639,13 @@ static inline int inode_unhashed(struct inode *inode)
|
|||
* 2: child/target
|
||||
* 3: xattr
|
||||
* 4: second non-directory
|
||||
* The last is for certain operations (such as rename) which lock two
|
||||
* 5: second parent (when locking independent directories in rename)
|
||||
*
|
||||
* I_MUTEX_NONDIR2 is for certain operations (such as rename) which lock two
|
||||
* non-directories at once.
|
||||
*
|
||||
* The locking order between these classes is
|
||||
* parent -> child -> normal -> xattr -> second non-directory
|
||||
* parent[2] -> child -> grandchild -> normal -> xattr -> second non-directory
|
||||
*/
|
||||
enum inode_i_mutex_lock_class
|
||||
{
|
||||
|
@ -651,7 +653,8 @@ enum inode_i_mutex_lock_class
|
|||
I_MUTEX_PARENT,
|
||||
I_MUTEX_CHILD,
|
||||
I_MUTEX_XATTR,
|
||||
I_MUTEX_NONDIR2
|
||||
I_MUTEX_NONDIR2,
|
||||
I_MUTEX_PARENT2,
|
||||
};
|
||||
|
||||
void lock_two_nondirectories(struct inode *, struct inode*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue