Lines Matching refs:fsn_mark
500 static __u32 fanotify_mark_remove_from_mask(struct fsnotify_mark *fsn_mark, in fanotify_mark_remove_from_mask() argument
507 spin_lock(&fsn_mark->lock); in fanotify_mark_remove_from_mask()
509 __u32 tmask = fsn_mark->mask & ~mask; in fanotify_mark_remove_from_mask()
514 oldmask = fsn_mark->mask; in fanotify_mark_remove_from_mask()
515 fsn_mark->mask = tmask; in fanotify_mark_remove_from_mask()
517 __u32 tmask = fsn_mark->ignored_mask & ~mask; in fanotify_mark_remove_from_mask()
520 fsn_mark->ignored_mask = tmask; in fanotify_mark_remove_from_mask()
522 *destroy = !(fsn_mark->mask | fsn_mark->ignored_mask); in fanotify_mark_remove_from_mask()
523 spin_unlock(&fsn_mark->lock); in fanotify_mark_remove_from_mask()
532 struct fsnotify_mark *fsn_mark = NULL; in fanotify_remove_mark() local
537 fsn_mark = fsnotify_find_mark(connp, group); in fanotify_remove_mark()
538 if (!fsn_mark) { in fanotify_remove_mark()
543 removed = fanotify_mark_remove_from_mask(fsn_mark, mask, flags, in fanotify_remove_mark()
545 if (removed & fsnotify_conn_mask(fsn_mark->connector)) in fanotify_remove_mark()
546 fsnotify_recalc_mask(fsn_mark->connector); in fanotify_remove_mark()
548 fsnotify_detach_mark(fsn_mark); in fanotify_remove_mark()
551 fsnotify_free_mark(fsn_mark); in fanotify_remove_mark()
554 fsnotify_put_mark(fsn_mark); in fanotify_remove_mark()
574 static __u32 fanotify_mark_add_to_mask(struct fsnotify_mark *fsn_mark, in fanotify_mark_add_to_mask() argument
580 spin_lock(&fsn_mark->lock); in fanotify_mark_add_to_mask()
582 __u32 tmask = fsn_mark->mask | mask; in fanotify_mark_add_to_mask()
587 oldmask = fsn_mark->mask; in fanotify_mark_add_to_mask()
588 fsn_mark->mask = tmask; in fanotify_mark_add_to_mask()
590 __u32 tmask = fsn_mark->ignored_mask | mask; in fanotify_mark_add_to_mask()
594 fsn_mark->ignored_mask = tmask; in fanotify_mark_add_to_mask()
596 fsn_mark->flags |= FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY; in fanotify_mark_add_to_mask()
598 spin_unlock(&fsn_mark->lock); in fanotify_mark_add_to_mask()
632 struct fsnotify_mark *fsn_mark; in fanotify_add_mark() local
636 fsn_mark = fsnotify_find_mark(connp, group); in fanotify_add_mark()
637 if (!fsn_mark) { in fanotify_add_mark()
638 fsn_mark = fanotify_add_new_mark(group, connp, type); in fanotify_add_mark()
639 if (IS_ERR(fsn_mark)) { in fanotify_add_mark()
641 return PTR_ERR(fsn_mark); in fanotify_add_mark()
644 added = fanotify_mark_add_to_mask(fsn_mark, mask, flags); in fanotify_add_mark()
645 if (added & ~fsnotify_conn_mask(fsn_mark->connector)) in fanotify_add_mark()
646 fsnotify_recalc_mask(fsn_mark->connector); in fanotify_add_mark()
649 fsnotify_put_mark(fsn_mark); in fanotify_add_mark()