freebsd-dev/sys/nfs4client
Konstantin Belousov eab626f110 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
..
nfs4_dev.c Add better sanity checking to the logic that handles ioctl processing 2006-05-13 00:16:35 +00:00
nfs4_dev.h
nfs4_idmap.c - Handle buffer lock waiters count directly in the buffer cache instead 2008-03-01 19:47:50 +00:00
nfs4_idmap.h
nfs4_socket.c
nfs4_subs.c NFSv4 client: 2006-11-28 19:33:28 +00:00
nfs4_vfs_subs.c Unstaticize nfs_iosize() in nfsclient and use it in nfs4client instead 2007-01-25 13:07:25 +00:00
nfs4_vfs.h
nfs4_vfsops.c - Complete part of the unfinished bufobj work by consistently using 2008-03-22 09:15:16 +00:00
nfs4_vn_subs.c NFSv4 client: 2006-11-28 19:33:28 +00:00
nfs4_vn.h
nfs4_vnops.c Move the head of byte-level advisory lock list from the 2008-04-16 11:33:32 +00:00
nfs4.h
nfs4m_subs.h