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 223f4f2..aa11e3b 100644
--- a/coda_vfsops.c
+++ b/coda_vfsops.c
@@ -153,19 +153,15 @@ coda_mount(struct mount *vfsp, struct th
     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.4.3.3.gc26a

Reply via email to