b5053f07a1
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. |
||
---|---|---|
.. | ||
files.nfs | ||
krpc_subr.c | ||
krpc.h | ||
Makefile | ||
nfs_bio.c | ||
nfs_boot.c | ||
nfs_bootdhcp.c | ||
nfs_bootparam.c | ||
nfs_kq.c | ||
nfs_node.c | ||
nfs_nqlease.c | ||
nfs_serv.c | ||
nfs_socket.c | ||
nfs_srvcache.c | ||
nfs_subs.c | ||
nfs_syscalls.c | ||
nfs_var.h | ||
nfs_vfsops.c | ||
nfs_vnops.c | ||
nfs.h | ||
nfsdiskless.h | ||
nfsm_subs.h | ||
nfsmount.h | ||
nfsnode.h | ||
nfsproto.h | ||
nfsrtt.h | ||
nfsrvcache.h | ||
nqnfs.h | ||
rpcv2.h | ||
xdr_subs.h |