aboutsummaryrefslogtreecommitdiffstats
path: root/fs/notify/inotify
diff options
context:
space:
mode:
Diffstat (limited to 'fs/notify/inotify')
-rw-r--r--fs/notify/inotify/inotify_fsnotify.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c
index aa3f93c03e0f..7cf518b25daa 100644
--- a/fs/notify/inotify/inotify_fsnotify.c
+++ b/fs/notify/inotify/inotify_fsnotify.c
@@ -142,23 +142,15 @@ static bool inotify_should_send_event(struct fsnotify_group *group, struct inode
142 struct vfsmount *mnt, struct fsnotify_mark *mark, 142 struct vfsmount *mnt, struct fsnotify_mark *mark,
143 __u32 mask, void *data, int data_type) 143 __u32 mask, void *data, int data_type)
144{ 144{
145 bool send; 145 if ((mark->mask & FS_EXCL_UNLINK) &&
146
147 pr_debug("%s: group=%p inode=%p mask=%x data=%p data_type=%d\n",
148 __func__, group, inode, mask, data, data_type);
149
150 mask = (mask & ~FS_EVENT_ON_CHILD);
151 send = (mark->mask & mask);
152
153 if (send && (mark->mask & FS_EXCL_UNLINK) &&
154 (data_type == FSNOTIFY_EVENT_FILE)) { 146 (data_type == FSNOTIFY_EVENT_FILE)) {
155 struct file *file = data; 147 struct file *file = data;
156 148
157 if (d_unlinked(file->f_path.dentry)) 149 if (d_unlinked(file->f_path.dentry))
158 send = false; 150 return false;
159 } 151 }
160 152
161 return send; 153 return true;
162} 154}
163 155
164/* 156/*