]> Zhao Yanbai Git Server - minix.git/commitdiff
fix from trunk: don't re-use mountpoints v3.1.7
authorBen Gras <ben@minix3.org>
Fri, 11 Jun 2010 11:43:31 +0000 (11:43 +0000)
committerBen Gras <ben@minix3.org>
Fri, 11 Jun 2010 11:43:31 +0000 (11:43 +0000)
servers/vfs/mount.c

index 7da620c7a2d689ed3e9fb50f3c1507496865f4b9..9cddb884eb9ffa662e11f534a9650443a9591682 100644 (file)
@@ -253,6 +253,12 @@ PRIVATE int mount_fs(endpoint_t fs_e)
        /* Get vnode of mountpoint */
        if ((vp = eat_path(PATH_NOFLAGS)) == NULL) return(err_code);
 
+              if (vp->v_ref_count != 1) {
+                      put_vnode(vp);
+                      return(EBUSY);
+              }
+
+
        /* Tell FS on which vnode it is mounted (glue into mount tree) */
        if ((r = req_mountpoint(vp->v_fs_e, vp->v_inode_nr)) != OK) {
                put_vnode(vp);