Jesse Keating 2f82dd
#607327
Jesse Keating 2f82dd
Jesse Keating 2f82dd
During the large inotify rewrite to fsnotify I completely dropped support
Jesse Keating 2f82dd
for IN_ONESHOT.  Reimplement that support.
Jesse Keating 2f82dd
Jesse Keating 2f82dd
Signed-off-by: Eric Paris <eparis@redhat.com>
Jesse Keating 2f82dd
---
Jesse Keating 2f82dd
Jesse Keating 2f82dd
 fs/notify/inotify/inotify_fsnotify.c |    3 +++
Jesse Keating 2f82dd
 1 files changed, 3 insertions(+), 0 deletions(-)
Jesse Keating 2f82dd
Jesse Keating 2f82dd
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c
Jesse Keating 2f82dd
index daa666a..388a150 100644
Jesse Keating 2f82dd
--- a/fs/notify/inotify/inotify_fsnotify.c
Jesse Keating 2f82dd
+++ b/fs/notify/inotify/inotify_fsnotify.c
Jesse Keating 2f82dd
@@ -126,6 +126,9 @@ static int inotify_handle_event(struct fsnotify_group *group, struct fsnotify_ev
Jesse Keating 2f82dd
 			ret = 0;
Jesse Keating 2f82dd
 	}
Jesse Keating 2f82dd
 
Jesse Keating 2f82dd
+	if (entry->mask & IN_ONESHOT)
Jesse Keating 2f82dd
+		fsnotify_destroy_mark_by_entry(entry);
Jesse Keating 2f82dd
+
Jesse Keating 2f82dd
 	/*
Jesse Keating 2f82dd
 	 * If we hold the entry until after the event is on the queue
Jesse Keating 2f82dd
 	 * IN_IGNORED won't be able to pass this event in the queue