X-Git-Url: https://bbs.cooldavid.org/git/?a=blobdiff_plain;f=fs%2Fnotify%2Finotify%2Finotify_fsnotify.c;h=9d332e7f5a5c582da04a36c6f26a44ca65fffd3d;hb=8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6;hp=388a150c3d4a4fbda541b4667bc1af106b88b3a2;hpb=611da04f7a31b2208e838be55a42c7a1310ae321;p=net-next-2.6.git diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c index 388a150c3d4..9d332e7f5a5 100644 --- a/fs/notify/inotify/inotify_fsnotify.c +++ b/fs/notify/inotify/inotify_fsnotify.c @@ -22,6 +22,7 @@ * General Public License for more details. */ +#include /* d_unlinked */ #include /* struct inode */ #include #include @@ -157,6 +158,14 @@ static bool inotify_should_send_event(struct fsnotify_group *group, struct inode mask = (mask & ~FS_EVENT_ON_CHILD); send = (fsn_mark->mask & mask); + if (send && (fsn_mark->mask & FS_EXCL_UNLINK) && + (data_type == FSNOTIFY_EVENT_PATH)) { + struct path *path = data; + + if (d_unlinked(path->dentry)) + send = false; + } + /* find took a reference */ fsnotify_put_mark(fsn_mark);