diff options
-rw-r--r-- | fs/notify/fanotify/fanotify_user.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index ff1a908c9708..fa71d5dfd102 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c | |||
@@ -558,15 +558,15 @@ static __u32 fanotify_mark_add_to_mask(struct fsnotify_mark *fsn_mark, | |||
558 | __u32 mask, | 558 | __u32 mask, |
559 | unsigned int flags) | 559 | unsigned int flags) |
560 | { | 560 | { |
561 | __u32 oldmask; | 561 | __u32 oldmask = -1; |
562 | 562 | ||
563 | spin_lock(&fsn_mark->lock); | 563 | spin_lock(&fsn_mark->lock); |
564 | if (!(flags & FAN_MARK_IGNORED_MASK)) { | 564 | if (!(flags & FAN_MARK_IGNORED_MASK)) { |
565 | oldmask = fsn_mark->mask; | 565 | oldmask = fsn_mark->mask; |
566 | fsnotify_set_mark_mask_locked(fsn_mark, (oldmask | mask)); | 566 | fsnotify_set_mark_mask_locked(fsn_mark, (oldmask | mask)); |
567 | } else { | 567 | } else { |
568 | oldmask = fsn_mark->ignored_mask; | 568 | __u32 tmask = fsn_mark->ignored_mask | mask; |
569 | fsnotify_set_mark_ignored_mask_locked(fsn_mark, (oldmask | mask)); | 569 | fsnotify_set_mark_ignored_mask_locked(fsn_mark, tmask); |
570 | if (flags & FAN_MARK_IGNORED_SURV_MODIFY) | 570 | if (flags & FAN_MARK_IGNORED_SURV_MODIFY) |
571 | fsn_mark->flags |= FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY; | 571 | fsn_mark->flags |= FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY; |
572 | } | 572 | } |