freebsd-dev/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 Fix -Wundef warnings found when compiling i386 LINT, GENERIC and 2005-12-05 11:58:35 +00:00
ext2_balloc.c Fix -Wundef warnings found when compiling i386 LINT, GENERIC and 2005-12-05 11:58:35 +00:00
ext2_bitops.h Repair ext2fs writes. 2006-04-13 19:37:32 +00:00
ext2_bmap.c - Move rusage from being per-process in struct pstats to per-thread in 2007-06-01 01:12:45 +00:00
ext2_extern.h Use vfs_hash() instead of home-rolled 2005-03-14 13:30:06 +00:00
ext2_fs_sb.h Add standard GPL boilerplate to these files. They are the only ones 2005-06-16 06:51:38 +00:00
ext2_fs.h Add standard GPL boilerplate to these files. They are the only ones 2005-06-16 06:51:38 +00:00
ext2_inode_cnv.c Move ext2fs from src/gnu to src/gnu/fs. 2005-06-15 02:36:11 +00:00
ext2_inode.c Add mnt_noasync counter to better handle interleaved calls to nmount(), 2006-09-26 04:15:59 +00:00
ext2_linux_balloc.c Add standard GPL boilerplate to these files. They are the only ones 2005-06-16 06:51:38 +00:00
ext2_linux_ialloc.c Fix -Wundef from compiling the amd64 LINT. 2005-12-04 10:06:06 +00:00
ext2_lookup.c VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in 2008-01-13 14:44:15 +00:00
ext2_mount.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:27:30 +00:00
ext2_readwrite.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:27:30 +00:00
ext2_subr.c Move ext2fs from src/gnu to src/gnu/fs. 2005-06-15 02:36:11 +00:00
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 VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in 2008-01-13 14:44:15 +00:00
i386-bitops.h Add standard GPL boilerplate to these files. They are the only ones 2005-06-16 06:51:38 +00:00
inode.h Move the head of byte-level advisory lock list from the 2008-04-16 11:33:32 +00:00
sparc64-bitops.h Add standard GPL boilerplate to these files. They are the only ones 2005-06-16 06:51:38 +00:00