linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fanotify: dont destroy mark when ignore mask is cleared
@ 2010-11-22 17:52 Lino Sanfilippo
  2010-11-23 19:51 ` Eric Paris
  0 siblings, 1 reply; 6+ messages in thread
From: Lino Sanfilippo @ 2010-11-22 17:52 UTC (permalink / raw)
  To: eparis; +Cc: linux-kernel, linux-fsdevel


In mark_remove_from_mask() the mark is destroyed regardless of whether the
event mask or ignore mask is cleared. We should only destroy the mark if the
event mask is cleared.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
---
 fs/notify/fanotify/fanotify_user.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Please apply this after patch "Dont allow a mask of 0 if setting or removing a
mark" which i sent today.

diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index 207cdeb..c9143a0 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -518,7 +518,7 @@ static __u32 fanotify_mark_remove_from_mask(struct fsnotify_mark *fsn_mark,
 	}
 	spin_unlock(&fsn_mark->lock);
 
-	if (!(oldmask & ~mask))
+	if (!(flags & FAN_MARK_IGNORED_MASK) && !(oldmask & ~mask))
 		fsnotify_destroy_mark(fsn_mark);
 
 	return mask & oldmask;
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread
[parent not found: <20101130121635.277910@gmx.net>]

end of thread, other threads:[~2010-11-30 16:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-22 17:52 [PATCH] fanotify: dont destroy mark when ignore mask is cleared Lino Sanfilippo
2010-11-23 19:51 ` Eric Paris
2010-11-24 12:31   ` Lino Sanfilippo
2010-11-29 20:45     ` Eric Paris
     [not found] <20101130121635.277910@gmx.net>
2010-11-30 15:59 ` Lino Sanfilippo
2010-11-30 16:19   ` Eric Paris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).