]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
inotify: fix inotify oneshot support
authorEric Paris <eparis@redhat.com>
Wed, 28 Jul 2010 14:18:37 +0000 (10:18 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Sep 2010 00:21:38 +0000 (17:21 -0700)
commit ff311008ab8d2f2cfdbbefd407d1b05acc8164b2 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/notify/inotify/inotify_fsnotify.c

index e27960cd76ab9046257826783d907bdb6f3ca2a8..5d3d2a782abcf00438f82e6c1cff75c44cc059ca 100644 (file)
@@ -72,6 +72,9 @@ static int inotify_handle_event(struct fsnotify_group *group, struct fsnotify_ev
                        ret = 0;
        }
 
+       if (entry->mask & IN_ONESHOT)
+               fsnotify_destroy_mark_by_entry(entry);
+
        /*
         * If we hold the entry until after the event is on the queue
         * IN_IGNORED won't be able to pass this event in the queue