Beispiel #1
0
INT32 FsRemoveFile(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 = ffsRemoveFile(inode, fid);

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

	return(err);
}
Beispiel #2
0
/* FsRemoveFile : remove a file */
INT32 FsRemoveFile(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 = ffsRemoveFile(inode, fid);

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

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