aboutsummaryrefslogtreecommitdiffstats
path: root/fs/notify/inode_mark.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/notify/inode_mark.c')
-rw-r--r--fs/notify/inode_mark.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c
index a13cf9e9233a..7d2962e5328e 100644
--- a/fs/notify/inode_mark.c
+++ b/fs/notify/inode_mark.c
@@ -312,9 +312,10 @@ void fsnotify_init_mark(struct fsnotify_mark_entry *entry,
312 * event types should be delivered to which group and for which inodes. 312 * event types should be delivered to which group and for which inodes.
313 */ 313 */
314int fsnotify_add_mark(struct fsnotify_mark_entry *entry, 314int fsnotify_add_mark(struct fsnotify_mark_entry *entry,
315 struct fsnotify_group *group, struct inode *inode) 315 struct fsnotify_group *group, struct inode *inode,
316 int allow_dups)
316{ 317{
317 struct fsnotify_mark_entry *lentry; 318 struct fsnotify_mark_entry *lentry = NULL;
318 int ret = 0; 319 int ret = 0;
319 320
320 inode = igrab(inode); 321 inode = igrab(inode);
@@ -331,7 +332,8 @@ int fsnotify_add_mark(struct fsnotify_mark_entry *entry,
331 spin_lock(&group->mark_lock); 332 spin_lock(&group->mark_lock);
332 spin_lock(&inode->i_lock); 333 spin_lock(&inode->i_lock);
333 334
334 lentry = fsnotify_find_mark_entry(group, inode); 335 if (!allow_dups)
336 lentry = fsnotify_find_mark_entry(group, inode);
335 if (!lentry) { 337 if (!lentry) {
336 entry->group = group; 338 entry->group = group;
337 entry->inode = inode; 339 entry->inode = inode;