inotify: dont skip removal of watch descriptor if creation of ignored event failed
authorLino Sanfilippo <LinoSanfilippo@gmx.de>
Sat, 24 Mar 2012 22:44:19 +0000 (23:44 +0100)
committerEric Paris <eparis@redhat.com>
Tue, 11 Dec 2012 18:44:37 +0000 (13:44 -0500)
commit8b99c3ccf735a2294c7842d236caa42e543e2c95
treec111247a941553f858975a348541fb50d1de5e9f
parent03a1cec1f17ac1a6041996b3e40f96b5a2f90e1b
inotify: dont skip removal of watch descriptor if creation of ignored event failed

In inotify_ignored_and_remove_idr() the removal of a watch descriptor is skipped
if the allocation of an ignored event failed and we are leaking memory (the
watch descriptor and the mark linked to it).
This patch ensures that the watch descriptor is removed regardless of whether
event creation failed or not.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Eric Paris <eparis@redhat.com>
fs/notify/inotify/inotify_user.c