inotify: silence BUG when using inotify ONESHOT functionality

The inotify might destroy a mark if it was placed with the IN_ONESHOT
flag.  This mark is going to be found and held in place by the srcu
lock.  But the destroy code assumes that anything which calls it will
have explicitly taken a reference.  Thus this reference isn't strictly
necessary from a safe operation point of view.  Instead of removing the
BUG(), which will hopefully help us find other cases of similar issues,
We chose to take a drop a reference in this rare case where it is safe.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
CC: stable@kernel.org
Signed-off-by: Eric Paris <eparis@redhat.com>
1 file changed