From: Eric Paris <eparis@redhat.com>
To: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fanotify: dont destroy mark when ignore mask is cleared
Date: Tue, 23 Nov 2010 14:51:19 -0500 [thread overview]
Message-ID: <1290541879.1443.32.camel@localhost.localdomain> (raw)
In-Reply-To: <20101122175229.GC5512@lsanfilippo.unix.rd.tt.avira.com>
On Mon, 2010-11-22 at 18:52 +0100, Lino Sanfilippo wrote:
> 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>
Hmmmm, really I'm not sure if that is right either (but it's certainly
closer) What about something like:
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index 81df3ad..29fbf17 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -527,7 +527,7 @@ static __u32 fanotify_mark_remove_from_mask(struct fsnotify_mark *fsn_mark,
}
spin_unlock(&fsn_mark->lock);
- if (!(oldmask & ~mask))
+ if (!fsn_mark->mask && !fsn_mark->ignored_mask)
fsnotify_destroy_mark(fsn_mark);
return mask & oldmask;
next prev parent reply other threads:[~2010-11-23 19:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-22 17:52 [PATCH] fanotify: dont destroy mark when ignore mask is cleared Lino Sanfilippo
2010-11-23 19:51 ` Eric Paris [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1290541879.1443.32.camel@localhost.localdomain \
--to=eparis@redhat.com \
--cc=LinoSanfilippo@gmx.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.