]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] inotify: fix event loss on hardlinked files
authorJohn McCutchan <ttb@tentacle.dhs.org>
Tue, 6 Sep 2005 22:18:02 +0000 (15:18 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:39 +0000 (16:57 -0700)
commit554f50beda3512f1b46b9ed364088e33d7c9cdf2
tree0a7bcce73c623f89cd5e8a97d2da7946da3293e3
parent7c3b5c7592e87e79d7d1a3729e3acff0ef64e025
[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>
fs/inotify.c
include/linux/inotify.h