]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC: r212043
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Sep 2010 01:28:05 +0000 (01:28 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Sep 2010 01:28:05 +0000 (01:28 +0000)
commita4a10a85ea29a19e85a465e8810dd68d09364c58
tree79c1c50240badd4fcd92d1ddd177a194ee65aa9c
parent402bd7c0033e15a23482b0eb32cb81d4af8ec22d
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.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212590 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/nullfs/null_vnops.c