freebsd-nq/sys/gnu/fs/ext2fs
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
..
COPYRIGHT.INFO
ext2_alloc.c
ext2_balloc.c
ext2_bitops.h
ext2_bmap.c
ext2_extern.h
ext2_fs_sb.h
ext2_fs.h
ext2_inode_cnv.c
ext2_inode.c
ext2_linux_balloc.c
ext2_linux_ialloc.c
ext2_lookup.c
ext2_mount.h
ext2_readwrite.c
ext2_subr.c
ext2_vfsops.c Fix a nit with the 'nofoo' options where 'foo' is mapped to 'nonofoo' 2008-03-26 20:48:07 +00:00
ext2_vnops.c Move the head of byte-level advisory lock list from the 2008-04-16 11:33:32 +00:00
fs.h
i386-bitops.h
inode.h Move the head of byte-level advisory lock list from the 2008-04-16 11:33:32 +00:00
sparc64-bitops.h