예제 #1
0
파일: exfat_api.c 프로젝트: coolshou/exfat
INT32 FsShutdown(void)
{
	INT32 i;

	for (i = 0; i < MAX_DRIVE; i++) {
		if (!fs_struct[i].mounted) continue;

		ffsUmountVol(fs_struct[i].sb);
	}

	return(ffsShutdown());
}
예제 #2
0
/* FsUmountVol : unmount the file system volume */
int FsUmountVol(struct super_block *sb)
{
	int err;
	FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info);

	sm_P(&z_sem);

	/* acquire the lock for file system critical section */
	sm_P(&p_fs->v_sem);

	err = ffsUmountVol(sb);
	buf_shutdown(sb);

	/* release the lock for file system critical section */
	sm_V(&p_fs->v_sem);

	sm_V(&z_sem);

	return err;
} /* end of FsUmountVol */
예제 #3
0
INT32 FsUmountVol(struct super_block *sb)
{
	INT32 err;
	FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info);

	sm_P(&z_sem);

	sm_P(&(fs_struct[p_fs->drv].v_sem));

	err = ffsUmountVol(sb);
	buf_shutdown(sb);

	sm_V(&(fs_struct[p_fs->drv].v_sem));

	fs_struct[p_fs->drv].mounted = FALSE;
	fs_struct[p_fs->drv].sb = NULL;

	sm_V(&z_sem);

	return(err);
}
예제 #4
0
파일: exfat_api.c 프로젝트: coolshou/exfat
/* FsUmountVol : unmount the file system volume */
INT32 FsUmountVol(struct super_block *sb)
{
	INT32 err;
	FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info);

	sm_P(&z_sem);

	/* acquire the lock for file system critical section */
	sm_P(&(fs_struct[p_fs->drv].v_sem));

	err = ffsUmountVol(sb);
	buf_shutdown(sb);

	/* release the lock for file system critical section */
	sm_V(&(fs_struct[p_fs->drv].v_sem));

	fs_struct[p_fs->drv].mounted = FALSE;
	fs_struct[p_fs->drv].sb = NULL;

	sm_V(&z_sem);

	return(err);
} /* end of FsUmountVol */