summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_eventhandler.c
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2002-10-11 01:04:14 +0000
committermckusick <mckusick@FreeBSD.org>2002-10-11 01:04:14 +0000
commit16ad96c43ce9e270c0bf2f3b58686de00fc36391 (patch)
treeeb43e473ae53215270c7fc5c42b3afc87469437c /sys/kern/subr_eventhandler.c
parentd62abf19a31226cab0b997316f5d332a67f9c6b8 (diff)
downloadFreeBSD-src-16ad96c43ce9e270c0bf2f3b58686de00fc36391.zip
FreeBSD-src-16ad96c43ce9e270c0bf2f3b58686de00fc36391.tar.gz
When considering a vnode for reuse in getnewvnode, we call
vcanrecycle to check a free vnode's availability. If it is available, vcanrecycle returns an error code of zero and the vnode in question locked. The getnewvnode routine then used to call vn_start_write with the V_NOWAIT flag. If the filesystem was suspended while taking a snapshot, the vn_start_write would fail but getnewvnode would fail to unlock the vnode, instead leaving it locked on the freelist. The result would be that the vnode would be locked forever and would eventually hang the system with a race to the root when it was attempted to recycle it. This fix moves the vn_start_write check into vcanrecycle where it will properly unlock the vnode if it is unavailable for recycling due to filesystem suspension. Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys/kern/subr_eventhandler.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud