[58/68] [PATCH] inotify: fix inotify oneshot support

From: Greg KH
Date: Fri Sep 24 2010 - 12:38:33 EST


2.6.32-stable review patch. If anyone has any objections, please let us know.

------------------

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@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
fs/notify/inotify/inotify_fsnotify.c | 3 +++
1 file changed, 3 insertions(+)

--- a/fs/notify/inotify/inotify_fsnotify.c
+++ b/fs/notify/inotify/inotify_fsnotify.c
@@ -72,6 +72,9 @@ static int inotify_handle_event(struct f
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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/