From: Jim Lieb <jlieb@panasas.com>
To: linux-fsdevel@vger.kernel.org
Cc: Jim Lieb <jlieb@panasas.com>
Subject: [PATCH 2/3] fanotify: enable support for ignoring self generated events
Date: Wed,  4 Sep 2013 11:31:01 -0700	[thread overview]
Message-ID: <1378319462-4767-3-git-send-email-jlieb@panasas.com> (raw)
In-Reply-To: <1378319462-4767-1-git-send-email-jlieb@panasas.com>
Add FAN_IGNORE_ME flag definition to be identical to FS_IGNORE_ME.
Signed-off-by: Jim Lieb <jlieb@panasas.com>
---
 fs/notify/fanotify/fanotify_user.c | 5 +++--
 include/uapi/linux/fanotify.h      | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index e44cb64..963a023 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -815,9 +815,10 @@ SYSCALL_DEFINE5(fanotify_mark, int, fanotify_fd, unsigned int, flags,
 	}
 
 #ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS
-	if (mask & ~(FAN_ALL_EVENTS | FAN_ALL_PERM_EVENTS | FAN_EVENT_ON_CHILD))
+	if (mask & ~(FAN_ALL_EVENTS | FAN_ALL_PERM_EVENTS |
+		     FAN_IGNORE_ME | FAN_EVENT_ON_CHILD))
 #else
-	if (mask & ~(FAN_ALL_EVENTS | FAN_EVENT_ON_CHILD))
+	if (mask & ~(FAN_ALL_EVENTS | FAN_IGNORE_ME | FAN_EVENT_ON_CHILD))
 #endif
 		return -EINVAL;
 
diff --git a/include/uapi/linux/fanotify.h b/include/uapi/linux/fanotify.h
index 030508d..93e9f09 100644
--- a/include/uapi/linux/fanotify.h
+++ b/include/uapi/linux/fanotify.h
@@ -17,6 +17,7 @@
 
 #define FAN_ONDIR		0x40000000	/* event occurred against dir */
 
+#define FAN_IGNORE_ME		0x00800000	/* do not send me events I caused */
 #define FAN_EVENT_ON_CHILD	0x08000000	/* interested in child events */
 
 /* helper events */
-- 
1.8.3.1
next prev parent reply	other threads:[~2013-09-04 18:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 18:30 RFC: fsnotify - Add support for ignoring self initiated events Jim Lieb
2013-09-04 18:31 ` [PATCH 1/3] fsnotify: add support for ignoring events from self Jim Lieb
2013-09-04 18:31 ` Jim Lieb [this message]
2013-09-04 18:31 ` [PATCH 3/3] inotify: enable support to ignore self generated events Jim Lieb
2013-09-11 14:27 ` RFC: fsnotify - Add support for ignoring self initiated events J. Bruce Fields
2013-09-11 17:03   ` Jim Lieb
  -- strict thread matches above, loose matches on Subject: below --
2013-10-16 19:13 [PATCH 0/3] " Jim Lieb
2013-10-16 19:13 ` [PATCH 2/3] fanotify: enable support for ignoring self generated events Jim Lieb
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=1378319462-4767-3-git-send-email-jlieb@panasas.com \
    --to=jlieb@panasas.com \
    --cc=linux-fsdevel@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 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).