[PATCH Coda 2/5] Mount was failing because we failed to match the
device operations.
Jan Harkes
jaharkes at cs.cmu.edu
Tue Jul 10 18:43:09 UTC 2007
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
More information about the freebsd-fs
mailing list