Explorar o código

inotify: fix inotify oneshot support

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>
Eric Paris %!s(int64=15) %!d(string=hai) anos
pai
achega
ff311008ab
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      fs/notify/inotify/inotify_fsnotify.c

+ 3 - 0
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