/*
- * Copyright (c) 2002-2010 Apple Inc. All rights reserved.
+ * Copyright (c) 2002-2016 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
kern_return_t kr;
lck_mtx_lock(nfs_lock_mutex);
+ if (nmp->nm_ldlink.tqe_next == NFSNOLIST) {
+ lck_mtx_unlock(nfs_lock_mutex);
+ return;
+ }
+
TAILQ_REMOVE(&nfs_lockd_mount_list, nmp, nm_ldlink);
+ nmp->nm_ldlink.tqe_next = NFSNOLIST;
+
nfs_lockd_mounts--;
/* send a shutdown request if there are no more lockd mounts */
*/
return (EAGAIN);
}
- return (kr);
}
-
/*
* NFS advisory byte-level locks (client)
((lastmsg + nmp->nm_tprintf_delay) < now.tv_sec)) {
lck_mtx_unlock(&nmp->nm_lock);
lastmsg = now.tv_sec;
- nfs_down(nmp, thd, 0, NFSSTA_LOCKTIMEO, "lockd not responding");
+ nfs_down(nmp, thd, 0, NFSSTA_LOCKTIMEO, "lockd not responding", 1);
wentdown = 1;
} else
lck_mtx_unlock(&nmp->nm_lock);
LOCKD_MSG *msg;
nmp = NFSTONMP(np);
- if (!nmp)
+ if (nfs_mount_gone(nmp))
return (ENXIO);
if (!nlop->nlo_open_owner) {
LOCKD_MSG *msg;
nmp = NFSTONMP(np);
- if (!nmp)
+ if (nfs_mount_gone(nmp))
return (ENXIO);
/* set up lock message request structure */