NetBSD/sys/nfs
wrstuden b5053f07a1 Adjust sillyrename cleanup code to deal with the parent vnode
already being locked by our thread. VOP_INACTIVATE() makes no
statement as to the lock state of the parent, yet this code assumed
we had it unlocked.

With this change, we let vn_lock() fail with EDEADLK if we already
have the parent locked. We then handle the rename cleanup, and on
the way out just vrele() the parent vnode, not vput() it.

Fixes a case seen by Steve Woodford at Wasabisystems dot com where
we'd panic while running a pkgsrc configure test that verified
fork() functionality. I expect the problem is a result of the recent
exit() changes and the performance of the machines he tested on.

Specifically we would crash during an nfs_remove(). As best I can
tell, when nfs_remove() tested to see if we should rename or we
should remove, v_usecount was > 1 and vattr.va_nlink was 1. Thus
we did the sillyrename in nfs_remove(). However by the time we got
down to the vput(vp), v_usecount had dropped to one and thus vput()
triggered the VOP_INACTIVATE() code path. nfs_inactive() tries to
lock the parent to undo the sillyrename, and deadlocks as we still
have it locked.
2004-01-23 22:20:20 +00:00
..
Makefile
files.nfs
krpc.h
krpc_subr.c
nfs.h Commit message for previous revision to sys/nfs/nfs.h: 2003-12-06 02:48:35 +00:00
nfs_bio.c comments in nfs_doio_write. 2004-01-10 14:52:53 +00:00
nfs_boot.c Back out the lwp/ktrace changes. They contained a lot of colateral damage, 2003-06-29 22:28:00 +00:00
nfs_bootdhcp.c Back out the lwp/ktrace changes. They contained a lot of colateral damage, 2003-06-29 22:28:00 +00:00
nfs_bootparam.c Back out the lwp/ktrace changes. They contained a lot of colateral damage, 2003-06-29 22:28:00 +00:00
nfs_kq.c Remove some assigned-to but otherwise unused variables. 2003-10-30 01:43:08 +00:00
nfs_node.c Adjust sillyrename cleanup code to deal with the parent vnode 2004-01-23 22:20:20 +00:00
nfs_nqlease.c Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
nfs_serv.c - get pages to loan out in uvm_loanuobjpages() rather than 2004-01-07 12:17:10 +00:00
nfs_socket.c Unix semantics dictate that access checks for files are done when it 2003-12-07 21:15:46 +00:00
nfs_srvcache.c comments. 2003-11-20 16:18:49 +00:00
nfs_subs.c nfs_zeropad: remove an unneeded substitution (and clean up a little.) 2003-11-29 19:31:13 +00:00
nfs_syscalls.c Fix a couple of small whitespace errors. 2003-12-07 18:58:11 +00:00
nfs_var.h when rexmitting a request due to NFSERR_JUKEBOX, 2003-07-23 13:52:23 +00:00
nfs_vfsops.c Dynamic sysctl. 2003-12-04 19:38:21 +00:00
nfs_vnops.c Unix semantics dictate that access checks for files are done when it 2003-12-07 21:15:46 +00:00
nfsdiskless.h Back out the lwp/ktrace changes. They contained a lot of colateral damage, 2003-06-29 22:28:00 +00:00
nfsm_subs.h change n_mtime from time_t to timespec in order to improve 2003-09-26 11:51:53 +00:00
nfsmount.h terminate snprintb 'new' format strings correctly. 2003-10-03 16:34:31 +00:00
nfsnode.h change n_mtime from time_t to timespec in order to improve 2003-09-26 11:51:53 +00:00
nfsproto.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
nfsrtt.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
nfsrvcache.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
nqnfs.h current trylater/jukebox retry delay is way too long and 2003-08-16 18:08:27 +00:00
rpcv2.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
xdr_subs.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00