On Sun, Jun 03, 2018 at 10:37:30AM -0700, Philip Guenther wrote:
> @@ -1602,7 +1607,7 @@ vfs_stall(struct proc *p, int stall)
>        */
>       TAILQ_FOREACH_REVERSE(mp, &mountlist, mntlist, mnt_list) {
>               if (stall) {
> -                     error = vfs_busy(mp, VB_WRITE|VB_WAIT);
> +                     error = vfs_busy(mp, VB_WRITE|VB_WAIT|VB_DUPOK);
>                       if (error) {
>                               printf("%s: busy\n", mp->mnt_stat.f_mntonname);
>                               allerror = error;

dounmount() does the vfs busy in the forward direction of the mnt_list.
        while ((mp = TAILQ_NEXT(mp, mnt_list)) != NULL) {
                        error = vfs_busy(mp, VB_WRITE|VB_WAIT);
Then it unmounts all nested mount points in the reverse direction.

So I think we should remove the _REVERSE in vfs_stall().

bluhm

Reply via email to