INT32 FsMapCluster(struct inode *inode, INT32 clu_offset, UINT32 *clu) { INT32 err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); if (clu == NULL) return(FFS_ERROR); sm_P(&(fs_struct[p_fs->drv].v_sem)); err = ffsMapCluster(inode, clu_offset, clu); sm_V(&(fs_struct[p_fs->drv].v_sem)); return(err); }
/* FsMapCluster : return the cluster number in the given cluster offset */ INT32 FsMapCluster(struct inode *inode, INT32 clu_offset, UINT32 *clu) { INT32 err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); /* check the validity of pointer parameters */ if (clu == NULL) return(FFS_ERROR); /* acquire the lock for file system critical section */ sm_P(&(fs_struct[p_fs->drv].v_sem)); err = ffsMapCluster(inode, clu_offset, clu); /* release the lock for file system critical section */ sm_V(&(fs_struct[p_fs->drv].v_sem)); return(err); } /* end of FsMapCluster */