Exemple #1
0
static void au_hfsn_free(struct au_hinode *hinode)
{
	struct au_hnotify *hn;
	struct fsnotify_mark *mark;

	hn = hinode->hi_notify;
	mark = &hn->hn_mark;
	fsnotify_destroy_mark(mark);
	fsnotify_put_mark(mark);

	/* TODO: bad approach */
	wait_event(au_hfsn_wq, hn->hn_mark_dead);
}
Exemple #2
0
/*
 * Destroy all marks in the given list. The marks must be already detached from
 * the original inode / vfsmount.
 */
void fsnotify_destroy_marks(struct list_head *to_free)
{
	struct fsnotify_mark *mark, *lmark;
	struct fsnotify_group *group;

	list_for_each_entry_safe(mark, lmark, to_free, free_list) {
		spin_lock(&mark->lock);
		fsnotify_get_group(mark->group);
		group = mark->group;
		spin_unlock(&mark->lock);

		fsnotify_destroy_mark(mark, group);
		fsnotify_put_mark(mark);
		fsnotify_put_group(group);
	}
Exemple #3
0
static int au_hfsn_free(struct au_hinode *hinode, struct au_hnotify *hn)
{
	struct fsnotify_mark *mark;
	unsigned long long ull;

	ull = atomic64_inc_return(&au_hfsn_ifree);
	BUG_ON(!ull);

	mark = &hn->hn_mark;
	fsnotify_destroy_mark(mark);
	fsnotify_put_mark(mark);

	/* free hn by myself */
	return 0;
}
Exemple #4
0
void audit_remove_mark(struct audit_fsnotify_mark *audit_mark)
{
	fsnotify_destroy_mark(&audit_mark->mark, audit_fsnotify_group);
	fsnotify_put_mark(&audit_mark->mark);
}