From: Ben Gras Date: Fri, 11 Jun 2010 11:43:31 +0000 (+0000) Subject: fix from trunk: don't re-use mountpoints X-Git-Tag: v3.1.7 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=2ec255bb5e8efff2b22c7d52b19a83aceaf49091;p=minix.git fix from trunk: don't re-use mountpoints --- diff --git a/servers/vfs/mount.c b/servers/vfs/mount.c index 7da620c7a..9cddb884e 100644 --- a/servers/vfs/mount.c +++ b/servers/vfs/mount.c @@ -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);