Date: Tue, 10 Jul 2007 14:01:58 -0400 From: Jan Harkes <jaharkes@cs.cmu.edu> To: freebsd-fs@freebsd.org Cc: Jan Harkes <jaharkes@cs.cmu.edu> Subject: [PATCH Coda 2/5] Mount was failing because we failed to match the device operations. Message-ID: <11840905213019-git-send-email-jaharkes@cs.cmu.edu> In-Reply-To: <2c84c1de0707060800t21f3f993mfb53f7975a881ed4@mail.gmail.com> References: <2c84c1de0707060800t21f3f993mfb53f7975a881ed4@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
But we don't have to, if we find the coda_mntinfo structure for this device in our linked list, we know the device is good. --- coda_vfsops.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/coda_vfsops.c b/coda_vfsops.c index 44538a2..68fdafe 100644 --- a/coda_vfsops.c +++ b/coda_vfsops.c @@ -153,19 +153,15 @@ coda_mount(struct mount *vfsp, struct thread *td) NDFREE(&ndp, NDF_ONLY_PNBUF); /* - * See if the device table matches our expectations. + * Initialize the mount record and link it to the vfs struct */ - if (dev->si_devsw->d_open != vc_nb_open) - { + mi = dev2coda_mntinfo(dev); + if (!mi) { MARK_INT_FAIL(CODA_MOUNT_STATS); + printf("Coda mount: %s is not a cfs device\n", from); return(ENXIO); } - /* - * Initialize the mount record and link it to the vfs struct - */ - mi = dev2coda_mntinfo(dev); - if (!VC_OPEN(&mi->mi_vcomm)) { MARK_INT_FAIL(CODA_MOUNT_STATS); return(ENODEV); -- 1.5.2.1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?11840905213019-git-send-email-jaharkes>