Let FSes exit themselves upon system shutdown

During shutdown all processes are semi-exited and FSes are unmounted.
This semi-exit causes trouble for FUSE mounts as they still need access
to file descriptors and working directory in order to unmount.
This commit is contained in:
Thomas Veerman 2011-08-26 15:14:55 +00:00
parent 27a2afc1e7
commit 78183bddff

View file

@ -344,15 +344,18 @@ PUBLIC void pm_reboot()
* will tell us about it). * will tell us about it).
*/ */
for (i = 0; i < NR_PROCS; i++) { for (i = 0; i < NR_PROCS; i++) {
rfp = &fproc[i];
if (rfp->fp_endpoint == NONE) continue;
/* Let FSes exit themselves */
if (find_vmnt(rfp->fp_endpoint) != NULL) continue;
/* Don't just free the proc right away, but let it finish what it was /* Don't just free the proc right away, but let it finish what it was
* doing first */ * doing first */
rfp = &fproc[i];
if (rfp->fp_endpoint != NONE) {
lock_proc(rfp, 0); lock_proc(rfp, 0);
free_proc(rfp, 0); free_proc(rfp, 0);
unlock_proc(rfp); unlock_proc(rfp);
} }
}
do_sync(); do_sync();
unmount_all(); unmount_all();