コード例 #1
0
ファイル: sbinfo.c プロジェクト: roalex/bravo-kernel
/*
 * they are necessary regardless sysfs is disabled.
 */
void au_si_free(struct kobject *kobj)
{
	struct au_sbinfo *sbinfo;
	struct super_block *sb;
	char *locked __maybe_unused; /* debug only */

	sbinfo = container_of(kobj, struct au_sbinfo, si_kobj);
	AuDebugOn(!list_empty(&sbinfo->si_plink.head));
	AuDebugOn(sbinfo->si_plink_maint);

	sb = sbinfo->si_sb;
	si_write_lock(sb);
	au_xino_clr(sb);
	au_br_free(sbinfo);
	si_write_unlock(sb);

	AuDebugOn(radix_tree_gang_lookup
		  (&sbinfo->au_si_pid.tree, (void **)&locked,
		   /*first_index*/PID_MAX_DEFAULT - 1,
		   /*max_items*/sizeof(locked)/sizeof(*locked)));

	kfree(sbinfo->si_branch);
	kfree(sbinfo->au_si_pid.bitmap);
	mutex_destroy(&sbinfo->si_xib_mtx);
	AuRwDestroy(&sbinfo->si_rwsem);

	kfree(sbinfo);
}
コード例 #2
0
ファイル: sbinfo.c プロジェクト: chrmorais/miniemc2
/*
 * they are necessary regardless sysfs is disabled.
 */
void au_si_free(struct kobject *kobj)
{
	struct au_sbinfo *sbinfo;
	struct super_block *sb;

	sbinfo = container_of(kobj, struct au_sbinfo, si_kobj);
	AuDebugOn(!list_empty(&sbinfo->si_plink.head));
	AuDebugOn(sbinfo->si_plink_maint);

	sb = sbinfo->si_sb;
	si_write_lock(sb);
	au_xino_clr(sb);
	au_br_free(sbinfo);
	kfree(sbinfo->si_branch);
	mutex_destroy(&sbinfo->si_xib_mtx);
	si_write_unlock(sb);
	AuRwDestroy(&sbinfo->si_rwsem);

	kfree(sbinfo);
}
コード例 #3
0
ファイル: plink.c プロジェクト: chrmorais/miniemc2
static int au_plink_maint_enter(struct file *file)
{
	int err;
	struct super_block *sb;
	struct au_sbinfo *sbinfo;

	err = 0;
	sb = file->f_dentry->d_sb;
	sbinfo = au_sbi(sb);
	/* make sure i am the only one in this fs */
	si_write_lock(sb);
	/* spin_lock(&sbinfo->si_plink_maint_lock); */
	if (!sbinfo->si_plink_maint)
		sbinfo->si_plink_maint = file;
	else
		err = -EBUSY;
	/* spin_unlock(&sbinfo->si_plink_maint_lock); */
	si_write_unlock(sb);

	return err;
}
コード例 #4
0
void aufs_write_lock(struct dentry *dentry)
{
	si_write_lock(dentry->d_sb, AuLock_FLUSH | AuLock_NOPLMW);
	di_write_lock_child(dentry);
}
コード例 #5
0
void aufs_write_lock(struct dentry *dentry)
{
	//au_wkq_wait_nwtask();
	si_write_lock(dentry->d_sb);
	di_write_lock_child(dentry);
}
コード例 #6
0
ファイル: sbinfo.c プロジェクト: chrmorais/miniemc2
void aufs_write_lock(struct dentry *dentry)
{
	si_write_lock(dentry->d_sb);
	di_write_lock_child(dentry);
}