Skip to content

Commit

Permalink
[PATCH] inotify: fix one-shot support
Browse files Browse the repository at this point in the history
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 <rml@novell.com>
Cc: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Robert Love authored and Linus Torvalds committed Feb 8, 2006
1 parent 8e08b75 commit b517311
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/inotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b517311

Please sign in to comment.