overlayfs: fix lockdep misannotation
authorMiklos Szeredi <miklos@szeredi.hu>
Mon, 27 Oct 2014 14:42:01 +0000 (15:42 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 28 Oct 2014 22:32:47 +0000 (18:32 -0400)
commitd1b72cc6d8cb766c802fdc70a5edc2f0ba8a2b57
tree35e1ed80b8a78b53538d73bd99525d17def9a7f5
parentc2096537d40f026672c4c6adfcd7247ce5799604
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>
fs/namei.c
fs/overlayfs/readdir.c
include/linux/fs.h