Ejemplo n.º 1
0
INT32 FsRemoveDir(struct inode *inode, FILE_ID_T *fid)
{
	INT32 err;
	struct super_block *sb = inode->i_sb;
	FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info);

	if (fid == NULL) return(FFS_INVALIDFID);

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

	err = ffsRemoveDir(inode, fid);

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

	return(err);
}
Ejemplo n.º 2
0
/* FsRemoveDir : remove a directory */
INT32 FsRemoveDir(struct inode *inode, FILE_ID_T *fid)
{
	INT32 err;
	struct super_block *sb = inode->i_sb;
	FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info);

	/* check the validity of the given file id */
	if (fid == NULL) return(FFS_INVALIDFID);

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

	err = ffsRemoveDir(inode, fid);

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

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