freebsd-skq/sys/fs
kib 52243403eb Move the head of byte-level advisory lock list from the
filesystem-specific vnode data to the struct vnode. Provide the
default implementation for the vop_advlock and vop_advlockasync.
Purge the locks on the vnode reclaim by using the lf_purgelocks().
The default implementation is augmented for the nfs and smbfs.
In the nfs_advlock, push the Giant inside the nfs_dolock.

Before the change, the vop_advlock and vop_advlockasync have taken the
unlocked vnode and dereferenced the fs-private inode data, racing with
with the vnode reclamation due to forced unmount. Now, the vop_getattr
under the shared vnode lock is used to obtain the inode size, and
later, in the lf_advlockasync, after locking the vnode interlock, the
VI_DOOMED flag is checked to prevent an operation on the doomed vnode.

The implementation of the lf_purgelocks() is submitted by dfr.

Reported by:	kris
Tested by:	kris, pho
Discussed with:	jeff, dfr
MFC after:	2 weeks
2008-04-16 11:33:32 +00:00
..
cd9660 Cleanup lockmgr interface and exported KPI: 2008-01-24 12:34:30 +00:00
coda Add the support for the AT_FDCWD and fd-relative name lookups to the 2008-03-31 12:01:21 +00:00
deadfs Below is slightly edited description of the LOR by Tor Egge: 2007-01-22 11:25:22 +00:00
devfs Do not dereference cdev->si_cdevsw, use the dev_refthread() to properly 2008-03-20 16:08:42 +00:00
fdescfs The temporary workaround for the call to the vget() without lock type in 2008-04-04 09:37:57 +00:00
fifofs Remove kernel support for M:N threading. 2008-03-12 10:12:01 +00:00
hpfs Cleanup lockmgr interface and exported KPI: 2008-01-24 12:34:30 +00:00
msdosfs Move the head of byte-level advisory lock list from the 2008-04-16 11:33:32 +00:00
ntfs Fix a lock leak in the ntfs locking scheme: 2008-02-13 13:02:12 +00:00
nullfs Add the support for the AT_FDCWD and fd-relative name lookups to the 2008-03-31 12:01:21 +00:00
nwfs Replace lockmgr lock protecting nwfs vnode hash table with an sx lock. 2008-03-02 19:02:30 +00:00
portalfs vn_lock() is currently only used with the 'curthread' passed as argument. 2008-01-10 01:10:58 +00:00
procfs Remove kernel support for M:N threading. 2008-03-12 10:12:01 +00:00
pseudofs Introduce some functions in the vnode locks namespace and in the ffs 2008-02-24 16:38:58 +00:00
smbfs Move the head of byte-level advisory lock list from the 2008-04-16 11:33:32 +00:00
tmpfs Move the head of byte-level advisory lock list from the 2008-04-16 11:33:32 +00:00
udf Cleanup lockmgr interface and exported KPI: 2008-01-24 12:34:30 +00:00
unionfs Optimize lockmgr in order to get rid of the pool mutex interlock, of the 2008-04-06 20:08:51 +00:00