+ } else if (error == ENODEV) {
+ /*
+ * The Filesystem is getting unmounted.
+ */
+ error = ENOENT;
+ } else if (error && (nretries < DEV_MAX_VNODE_RETRY)) {
+ /*
+ * If we got an error from vnode_getwithvid, it means
+ * we raced with a recycle and lost i.e. we asked for
+ * an iocount only after vnode_drain had been entered
+ * for the vnode and returned with an error only after
+ * devfs_reclaim was called on the vnode. devfs_reclaim
+ * sets dn_vn to NULL but while we were waiting to
+ * reacquire DEVFS_LOCK, another vnode might have gotten
+ * associated with the dnp. In either case, we need to
+ * retry otherwise we will end up returning an ENOENT
+ * for this lookup but the next lookup will succeed
+ * because it creates a new vnode (or a racing lookup
+ * created a new vnode already).
+ */
+ error = 0;
+ nretries++;
+ goto retry;