From owner-cvs-all Thu Oct 10 18: 4:16 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 464BB37B401; Thu, 10 Oct 2002 18:04:15 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08E3543E77; Thu, 10 Oct 2002 18:04:15 -0700 (PDT) (envelope-from mckusick@FreeBSD.org) Received: from freefall.freebsd.org (mckusick@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g9B14ECo084763; Thu, 10 Oct 2002 18:04:14 -0700 (PDT) (envelope-from mckusick@freefall.freebsd.org) Received: (from mckusick@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g9B14E7i084762; Thu, 10 Oct 2002 18:04:14 -0700 (PDT) Message-Id: <200210110104.g9B14E7i084762@freefall.freebsd.org> From: Kirk McKusick Date: Thu, 10 Oct 2002 18:04:14 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern vfs_subr.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG mckusick 2002/10/10 18:04:14 PDT Modified files: sys/kern vfs_subr.c Log: 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. Revision Changes Path 1.412 +18 -13 src/sys/kern/vfs_subr.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message