[Libsysio-commit] HEAD: libsysio/src mount.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2008-04-14 23:26:17
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv490 Modified Files: mount.c Log Message: Two changes: 1) _sysio_do_mount and _sysio_do_unmount deliver a debug using _sysio_p_show when called. 2) _sysio_unmount_all always tries to unmount the front of the all-mounts list -- Latest is first. This, to avoid attempting to unmount a lower file system in the graph underneath a failed upper. Index: mount.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/mount.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -w -b -B -p -r1.26 -r1.27 --- mount.c 24 Sep 2007 19:00:03 -0000 1.26 +++ mount.c 14 Apr 2008 23:26:13 -0000 1.27 @@ -74,7 +74,7 @@ struct qstr _sysio_mount_file_name = { " /* * Active mounts. */ -static LIST_HEAD(, mount) mounts; +LIST_HEAD(, mount) mounts; static int _sysio_sub_fsswop_mount(const char *source, unsigned flags, @@ -187,6 +187,9 @@ _sysio_do_mount(struct filesys *fs, LIST_INSERT_HEAD(&mounts, mnt, mnt_link); +#ifdef P_DEBUG + _sysio_p_show("DO_MOUNT", mnt->mnt_root); +#endif *mntp = mnt; return 0; @@ -239,6 +242,9 @@ _sysio_do_unmount(struct mount *mnt) */ return -EBUSY; } +#ifdef P_DEBUG + _sysio_p_show("DO_UNMOUNT", mnt->mnt_root); +#endif assert(mnt->mnt_covers->p_cover == root); if (_sysio_p_prune(root) != 1) { /* @@ -432,17 +438,15 @@ int _sysio_unmount_all() { int err; - struct mount *mnt, *nxt; + struct mount *mnt; struct pnode *pno; err = 0; - nxt = mounts.lh_first; - while ((mnt = nxt)) { - nxt = mnt->mnt_link.le_next; + while ((mnt = mounts.lh_first)) { pno = mnt->mnt_root; /* * If this is an automount generated mount, the root - * has no reference. We can cause the dismount with a + * has no reference. We can accomplish the dismount with a * simple prune. */ if (!_sysio_p_prune(pno)) |