* [PATCH 1/2] inotify: fix inotify oneshot support
@ 2010-07-08 20:58 Eric Paris
2010-07-08 20:58 ` [PATCH 2/2] inotify: send IN_UNMOUNT events Eric Paris
0 siblings, 1 reply; 2+ messages in thread
From: Eric Paris @ 2010-07-08 20:58 UTC (permalink / raw)
To: linux-kernel; +Cc: viro
During the large inotify rewrite to fsnotify I completely dropped support
for IN_ONESHOT. Reimplement that support.
Signed-off-by: Eric Paris <eparis@redhat.com>
---
fs/notify/inotify/inotify_fsnotify.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c
index daa666a..388a150 100644
--- a/fs/notify/inotify/inotify_fsnotify.c
+++ b/fs/notify/inotify/inotify_fsnotify.c
@@ -126,6 +126,9 @@ static int inotify_handle_event(struct fsnotify_group *group, struct fsnotify_ev
ret = 0;
}
+ if (fsn_mark->mask & IN_ONESHOT)
+ fsnotify_destroy_mark(fsn_mark);
+
/*
* If we hold the fsn_mark until after the event is on the queue
* IN_IGNORED won't be able to pass this event in the queue
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] inotify: send IN_UNMOUNT events
2010-07-08 20:58 [PATCH 1/2] inotify: fix inotify oneshot support Eric Paris
@ 2010-07-08 20:58 ` Eric Paris
0 siblings, 0 replies; 2+ messages in thread
From: Eric Paris @ 2010-07-08 20:58 UTC (permalink / raw)
To: linux-kernel; +Cc: viro
Since the .31 or so notify rewrite inotify has not sent events about
inodes which are unmounted. This patch restores those events.
Signed-off-by: Eric Paris <eparis@redhat.com>
---
fs/notify/inotify/inotify_user.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index 44aeb0f..f381daf 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -90,8 +90,11 @@ static inline __u32 inotify_arg_to_mask(u32 arg)
{
__u32 mask;
- /* everything should accept their own ignored and cares about children */
- mask = (FS_IN_IGNORED | FS_EVENT_ON_CHILD);
+ /*
+ * everything should accept their own ignored, cares about children,
+ * and should receive events when the inode is unmounted
+ */
+ mask = (FS_IN_IGNORED | FS_EVENT_ON_CHILD | FS_UNMOUNT);
/* mask off the flags used to open the fd */
mask |= (arg & (IN_ALL_EVENTS | IN_ONESHOT));
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-08 20:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-08 20:58 [PATCH 1/2] inotify: fix inotify oneshot support Eric Paris
2010-07-08 20:58 ` [PATCH 2/2] inotify: send IN_UNMOUNT events Eric Paris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®