Example #1
0
static int au_hfsn_reset_br(unsigned int udba, struct au_branch *br, int perm)
{
	int err;

	err = 0;
	if (udba != AuOpt_UDBA_HNOTIFY
	    || !au_br_hnotifyable(perm)) {
		au_hfsn_fin_br(br);
		br->br_hfsn_group = NULL;
		goto out;
	}

	if (br->br_hfsn_group)
		goto out;

	br->br_hfsn_group = fsnotify_alloc_group(&br->br_hfsn_ops);
	if (IS_ERR(br->br_hfsn_group)) {
		err = PTR_ERR(br->br_hfsn_group);
		pr_err("fsnotify_alloc_group() failed, %d\n", err);
		br->br_hfsn_group = NULL;
	}

out:
	AuTraceErr(err);
	return err;
}
Example #2
0
static int __init audit_fsnotify_init(void)
{
	audit_fsnotify_group = fsnotify_alloc_group(&audit_mark_fsnotify_ops);
	if (IS_ERR(audit_fsnotify_group)) {
		audit_fsnotify_group = NULL;
		audit_panic("cannot create audit fsnotify group");
	}
	return 0;
}