summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-07-11 21:21:55 +0000
committerrwatson <rwatson@FreeBSD.org>2007-07-11 21:21:55 +0000
commitf30a555ada1b1a4cdfd1c42591b4f3466f940317 (patch)
tree6c13ed3d445da070b1634ca9c00fc80f1423c86b
parent3287a2c53fcfb6141e98f687b8bc2a5df5fdc418 (diff)
downloadFreeBSD-src-f30a555ada1b1a4cdfd1c42591b4f3466f940317.zip
FreeBSD-src-f30a555ada1b1a4cdfd1c42591b4f3466f940317.tar.gz
Resolve Coda mount failing because Coda failed to match the device
operations. 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. Submitted by: Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith)
-rw-r--r--sys/coda/coda_vfsops.c12
-rw-r--r--sys/fs/coda/coda_vfsops.c12
2 files changed, 8 insertions, 16 deletions
diff --git a/sys/coda/coda_vfsops.c b/sys/coda/coda_vfsops.c
index 28994c7..ffce238 100644
--- a/sys/coda/coda_vfsops.c
+++ b/sys/coda/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);
diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c
index 28994c7..ffce238 100644
--- a/sys/fs/coda/coda_vfsops.c
+++ b/sys/fs/coda/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);
OpenPOWER on IntegriCloud