From b5173119ff10c5538e92a7957a50887ae170b8da Mon Sep 17 00:00:00 2001 From: Robert Love Date: Tue, 7 Feb 2006 12:58:45 -0800 Subject: [PATCH] [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: Robert Love Cc: John McCutchan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/inotify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/inotify.c b/fs/inotify.c index 878ccca6121..3041503bde0 100644 --- a/fs/inotify.c +++ b/fs/inotify.c @@ -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; -- 2.11.4.GIT