diff options
author | John McCutchan <ttb@tentacle.dhs.org> | 2005-09-06 18:18:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 19:57:39 -0400 |
commit | 7ea6040b0eff07d3a9a4e2d248ac137c6ad02d42 (patch) | |
tree | 0a7bcce73c623f89cd5e8a97d2da7946da3293e3 /include/linux/inotify.h | |
parent | 8191151d0933d65fb6b659ffbd765479f0f200e1 (diff) |
[PATCH] inotify: fix event loss on hardlinked files
People have run into a problem when they do this:
watch (file1, all_events);
watch (file2, some_events);
if file2 is a hard link to file1, some events will be missed because by
default we replace the mask. The patch below adds a flag IN_MASK_ADD which
will cause inotify to add to the existing mask if present.
Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/inotify.h')
-rw-r--r-- | include/linux/inotify.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/inotify.h b/include/linux/inotify.h index 93bb3afe646b..ee5b239092ed 100644 --- a/include/linux/inotify.h +++ b/include/linux/inotify.h | |||
@@ -47,6 +47,7 @@ struct inotify_event { | |||
47 | #define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* moves */ | 47 | #define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* moves */ |
48 | 48 | ||
49 | /* special flags */ | 49 | /* special flags */ |
50 | #define IN_MASK_ADD 0x20000000 /* add to the mask of an already existing watch */ | ||
50 | #define IN_ISDIR 0x40000000 /* event occurred against dir */ | 51 | #define IN_ISDIR 0x40000000 /* event occurred against dir */ |
51 | #define IN_ONESHOT 0x80000000 /* only send event once */ | 52 | #define IN_ONESHOT 0x80000000 /* only send event once */ |
52 | 53 | ||