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()); }
/* 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 */
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); }
/* 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 */