Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5173119 authored by Robert Love's avatar Robert Love Committed by Linus Torvalds
Browse files

[PATCH] inotify: fix one-shot support



Fix one-shot support in inotify.  We currently drop the IN_ONESHOT flag
during watch addition.  Fix is to not do that.

Signed-off-by: default avatarRobert Love <rml@novell.com>
Cc: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8e08b756
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -967,7 +967,7 @@ asmlinkage long sys_inotify_add_watch(int fd, const char __user *path, u32 mask)
		mask_add = 1;

	/* don't let user-space set invalid bits: we don't want flags set */
	mask &= IN_ALL_EVENTS;
	mask &= IN_ALL_EVENTS | IN_ONESHOT;
	if (unlikely(!mask)) {
		ret = -EINVAL;
		goto out;