From owner-cvs-src-old@FreeBSD.ORG Tue Sep 14 01:28:30 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D9DD1065679 for ; Tue, 14 Sep 2010 01:28:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4B6D28FC26 for ; Tue, 14 Sep 2010 01:28:30 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o8E1SUdC071969 for ; Tue, 14 Sep 2010 01:28:30 GMT (envelope-from rmacklem@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o8E1SUCC071968 for cvs-src-old@freebsd.org; Tue, 14 Sep 2010 01:28:30 GMT (envelope-from rmacklem@repoman.freebsd.org) Message-Id: <201009140128.o8E1SUCC071968@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to rmacklem@repoman.freebsd.org using -f From: Rick Macklem Date: Tue, 14 Sep 2010 01:28:05 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_8 Subject: cvs commit: src/sys/fs/nullfs null_vnops.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 01:28:30 -0000 rmacklem 2010-09-14 01:28:05 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) sys/fs/nullfs null_vnops.c Log: SVN rev 212590 on 2010-09-14 01:28:05Z by rmacklem MFC: r212043 Add a null_remove() function to nullfs, so that the v_usecount of the lower level vnode is incremented to greater than 1 when the upper level vnode's v_usecount is greater than one. This is necessary for the NFS clients, so that they will do a silly rename of the file instead of actually removing it when the file is still in use. It is "racy", since the v_usecount is incremented in many places in the kernel with minimal synchronization, but an extraneous silly rename is preferred to not doing a silly rename when it is required. The only other file systems that currently check the value of v_usecount in their VOP_REMOVE() functions are nwfs and smbfs. These file systems choose to fail a remove when the v_usecount is greater than 1 and I believe will function more correctly with this patch, as well. Revision Changes Path 1.111.2.2 +27 -0 src/sys/fs/nullfs/null_vnops.c