aboutsummaryrefslogtreecommitdiffstats
path: root/fs/notify/dnotify/dnotify.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/notify/dnotify/dnotify.c')
-rw-r--r--fs/notify/dnotify/dnotify.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c
index cac2eb896639..69f42df9ba45 100644
--- a/fs/notify/dnotify/dnotify.c
+++ b/fs/notify/dnotify/dnotify.c
@@ -95,7 +95,7 @@ static int dnotify_handle_event(struct fsnotify_group *group,
95 95
96 to_tell = event->to_tell; 96 to_tell = event->to_tell;
97 97
98 fsn_mark = fsnotify_find_mark(group, to_tell); 98 fsn_mark = fsnotify_find_inode_mark(group, to_tell);
99 if (unlikely(!fsn_mark)) 99 if (unlikely(!fsn_mark))
100 return 0; 100 return 0;
101 dn_mark = container_of(fsn_mark, struct dnotify_mark, fsn_mark); 101 dn_mark = container_of(fsn_mark, struct dnotify_mark, fsn_mark);
@@ -143,14 +143,14 @@ static bool dnotify_should_send_event(struct fsnotify_group *group,
143 if (!S_ISDIR(inode->i_mode)) 143 if (!S_ISDIR(inode->i_mode))
144 return false; 144 return false;
145 145
146 fsn_mark = fsnotify_find_mark(group, inode); 146 fsn_mark = fsnotify_find_inode_mark(group, inode);
147 if (!fsn_mark) 147 if (!fsn_mark)
148 return false; 148 return false;
149 149
150 mask = (mask & ~FS_EVENT_ON_CHILD); 150 mask = (mask & ~FS_EVENT_ON_CHILD);
151 send = (mask & fsn_mark->mask); 151 send = (mask & fsn_mark->mask);
152 152
153 fsnotify_put_mark(fsn_mark); /* matches fsnotify_find_mark */ 153 fsnotify_put_mark(fsn_mark); /* matches fsnotify_find_inode_mark */
154 154
155 return send; 155 return send;
156} 156}
@@ -193,7 +193,7 @@ void dnotify_flush(struct file *filp, fl_owner_t id)
193 if (!S_ISDIR(inode->i_mode)) 193 if (!S_ISDIR(inode->i_mode))
194 return; 194 return;
195 195
196 fsn_mark = fsnotify_find_mark(dnotify_group, inode); 196 fsn_mark = fsnotify_find_inode_mark(dnotify_group, inode);
197 if (!fsn_mark) 197 if (!fsn_mark)
198 return; 198 return;
199 dn_mark = container_of(fsn_mark, struct dnotify_mark, fsn_mark); 199 dn_mark = container_of(fsn_mark, struct dnotify_mark, fsn_mark);
@@ -346,12 +346,12 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)
346 mutex_lock(&dnotify_mark_mutex); 346 mutex_lock(&dnotify_mark_mutex);
347 347
348 /* add the new_fsn_mark or find an old one. */ 348 /* add the new_fsn_mark or find an old one. */
349 fsn_mark = fsnotify_find_mark(dnotify_group, inode); 349 fsn_mark = fsnotify_find_inode_mark(dnotify_group, inode);
350 if (fsn_mark) { 350 if (fsn_mark) {
351 dn_mark = container_of(fsn_mark, struct dnotify_mark, fsn_mark); 351 dn_mark = container_of(fsn_mark, struct dnotify_mark, fsn_mark);
352 spin_lock(&fsn_mark->lock); 352 spin_lock(&fsn_mark->lock);
353 } else { 353 } else {
354 fsnotify_add_mark(new_fsn_mark, dnotify_group, inode, 0); 354 fsnotify_add_mark(new_fsn_mark, dnotify_group, inode, NULL, 0);
355 spin_lock(&new_fsn_mark->lock); 355 spin_lock(&new_fsn_mark->lock);
356 fsn_mark = new_fsn_mark; 356 fsn_mark = new_fsn_mark;
357 dn_mark = new_dn_mark; 357 dn_mark = new_dn_mark;