freebsd-dev/sys/gnu/fs/xfs
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
..
FreeBSD Move the head of byte-level advisory lock list from the 2008-04-16 11:33:32 +00:00
xfs_acl.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_acl.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_ag.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_alloc_btree.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_alloc_btree.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_alloc.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_alloc.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_arch.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_attr_leaf.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_attr_leaf.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_attr_sf.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_attr.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_attr.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_behavior.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_behavior.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_bit.c Bow to incomplete GCC 4. constant propagation optimizations and 2007-05-30 03:03:06 +00:00
xfs_bit.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_bmap_btree.c Bow to incomplete GCC 4. constant propagation optimizations and 2007-05-30 03:03:06 +00:00
xfs_bmap_btree.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_bmap.c Bow to incomplete GCC 4. constant propagation optimizations and 2007-05-30 03:03:06 +00:00
xfs_bmap.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_btree.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_btree.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_buf_item.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_buf_item.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_cap.c
xfs_cap.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_clnt.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_da_btree.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_da_btree.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dfrag.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dfrag.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dinode.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir2_block.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir2_block.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir2_data.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir2_data.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir2_leaf.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir2_leaf.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir2_node.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir2_node.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir2_sf.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir2_sf.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir2_trace.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir2_trace.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir2.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir2.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir_leaf.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir_leaf.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir_sf.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dir.c Bow to incomplete GCC 4. constant propagation optimizations and 2007-05-30 03:03:06 +00:00
xfs_dir.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dmapi.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_dmops.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_error.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_error.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_extfree_item.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_extfree_item.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_fs.h Change %llx to %jx in printf() to eliminate warnings on 64-bit platforms. 2006-06-09 06:57:00 +00:00
xfs_fsops.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_fsops.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_ialloc_btree.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_ialloc_btree.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_ialloc.c Bow to incomplete GCC 4. constant propagation optimizations and 2007-05-30 03:03:06 +00:00
xfs_ialloc.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_iget.c More changes due to latest XFS import. 2006-06-09 06:07:42 +00:00
xfs_imap.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_inode_item.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_inode_item.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_inode.c Bow to incomplete GCC 4. constant propagation optimizations and 2007-05-30 03:03:06 +00:00
xfs_inode.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_inum.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_iocore.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_iomap.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_iomap.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_itable.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_itable.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_log_priv.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_log_recover.c Bow to incomplete GCC 4. constant propagation optimizations and 2007-05-30 03:03:06 +00:00
xfs_log_recover.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_log.c Bow to incomplete GCC 4. constant propagation optimizations and 2007-05-30 03:03:06 +00:00
xfs_log.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_mac.c
xfs_mac.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_mount.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_mount.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_qmops.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_quota.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_refcache.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_refcache.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_rename.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_rtalloc.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_rtalloc.h Bow to incomplete GCC 4. constant propagation optimizations and 2007-05-30 03:03:06 +00:00
xfs_rw.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_rw.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_sb.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_trans_ail.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_trans_buf.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_trans_extfree.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_trans_inode.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_trans_item.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_trans_priv.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_trans_space.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_trans.c Remove debugging printf 2006-06-11 00:19:00 +00:00
xfs_trans.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_types.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_utils.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_utils.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_vfsops.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfs_vnodeops.c Bow to incomplete GCC 4. constant propagation optimizations and 2007-05-30 03:03:06 +00:00
xfs.h Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00
xfsidbg.c Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree. 2006-06-09 06:04:06 +00:00