Index: sys/coda/coda_vfsops.c =================================================================== RCS file: /cvsroot/src/sys/coda/coda_vfsops.c,v retrieving revision 1.76 diff -u -p -r1.76 coda_vfsops.c --- sys/coda/coda_vfsops.c 23 Nov 2013 17:57:23 -0000 1.76 +++ sys/coda/coda_vfsops.c 23 Nov 2013 18:27:59 -0000 @@ -619,10 +619,14 @@ struct mount *devtomp(dev_t dev) TAILQ_FOREACH(mp, &mountlist, mnt_list) { if ((!strcmp(mp->mnt_op->vfs_name, MOUNT_UFS)) && ((VFSTOUFS(mp))->um_dev == (dev_t) dev)) { - /* mount corresponds to UFS and the device matches one we want */ - break; + /* + * mount corresponds to UFS and the device matches one we + * want + */ + mutex_exit(&mountlist_lock); + return mp; } } mutex_exit(&mountlist_lock); - return mp == TAILQ_END(&mountlist) ? NULL : mp; + return NULL; }