From owner-cvs-src@FreeBSD.ORG Sat Nov 15 17:11:12 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E561016A4CE; Sat, 15 Nov 2003 17:11:12 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09DCF43FBF; Sat, 15 Nov 2003 17:11:12 -0800 (PST) (envelope-from truckman@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hAG1BBXJ020341; Sat, 15 Nov 2003 17:11:11 -0800 (PST) (envelope-from truckman@repoman.freebsd.org) Received: (from truckman@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hAG1BB64020340; Sat, 15 Nov 2003 17:11:11 -0800 (PST) (envelope-from truckman) Message-Id: <200311160111.hAG1BB64020340@repoman.freebsd.org> From: Don Lewis Date: Sat, 15 Nov 2003 17:11:11 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/fs/fifofs fifo_vnops.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2003 01:11:13 -0000 truckman 2003/11/15 17:11:11 PST FreeBSD src repository Modified files: sys/fs/fifofs fifo_vnops.c Log: Use "fip->fi_readers == 0 && fip->fi_writers == 0" as the condition for disposing fifo resources in fifo_cleanup() instead using of "vp->v_usecount == 1". There may be other references to the vnode, for instance by nullfs, at the time fifo_open() or fifo_close() is called, which could cause a resource leak. Don't bother grabbing the vnode interlock in fifo_cleanup() since it no longer accesses v_usecount. Revision Changes Path 1.91 +3 -6 src/sys/fs/fifofs/fifo_vnops.c