xfs: Replace xfs_isilocked with xfs_assert_ilocked
To use the new rwsem_assert_held()/rwsem_assert_held_write(), we can't use the existing ASSERT macro. Add a new xfs_assert_ilocked() and convert all the callers. Fix an apparent bug in xfs_isilocked(): If the caller specifies XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL, xfs_assert_ilocked() will check both the IOLOCK and the ILOCK are held for write. xfs_isilocked() only checked that the ILOCK was held for write. xfs_assert_ilocked() is always on, even if DEBUG or XFS_WARN aren't defined. It's a cheap check, so I don't think it's worth defining it away. Reviewed-by:"Darrick J. Wong" <djwong@kernel.org> Reviewed-by:
Dave Chinner <dchinner@redhat.com> Signed-off-by:
"Matthew Wilcox (Oracle)" <willy@infradead.org> Signed-off-by:
Chandan Babu R <chandanbabu@kernel.org>
Showing
- fs/xfs/libxfs/xfs_attr.c 1 addition, 1 deletionfs/xfs/libxfs/xfs_attr.c
- fs/xfs/libxfs/xfs_attr_remote.c 1 addition, 1 deletionfs/xfs/libxfs/xfs_attr_remote.c
- fs/xfs/libxfs/xfs_bmap.c 10 additions, 11 deletionsfs/xfs/libxfs/xfs_bmap.c
- fs/xfs/libxfs/xfs_defer.c 1 addition, 1 deletionfs/xfs/libxfs/xfs_defer.c
- fs/xfs/libxfs/xfs_inode_fork.c 1 addition, 1 deletionfs/xfs/libxfs/xfs_inode_fork.c
- fs/xfs/libxfs/xfs_rtbitmap.c 1 addition, 1 deletionfs/xfs/libxfs/xfs_rtbitmap.c
- fs/xfs/libxfs/xfs_trans_inode.c 3 additions, 3 deletionsfs/xfs/libxfs/xfs_trans_inode.c
- fs/xfs/scrub/readdir.c 2 additions, 2 deletionsfs/xfs/scrub/readdir.c
- fs/xfs/xfs_attr_list.c 1 addition, 1 deletionfs/xfs/xfs_attr_list.c
- fs/xfs/xfs_bmap_util.c 4 additions, 6 deletionsfs/xfs/xfs_bmap_util.c
- fs/xfs/xfs_dir2_readdir.c 1 addition, 1 deletionfs/xfs/xfs_dir2_readdir.c
- fs/xfs/xfs_dquot.c 2 additions, 2 deletionsfs/xfs/xfs_dquot.c
- fs/xfs/xfs_file.c 2 additions, 2 deletionsfs/xfs/xfs_file.c
- fs/xfs/xfs_inode.c 21 additions, 47 deletionsfs/xfs/xfs_inode.c
- fs/xfs/xfs_inode.h 1 addition, 1 deletionfs/xfs/xfs_inode.h
- fs/xfs/xfs_inode_item.c 2 additions, 2 deletionsfs/xfs/xfs_inode_item.c
- fs/xfs/xfs_iops.c 1 addition, 2 deletionsfs/xfs/xfs_iops.c
- fs/xfs/xfs_qm.c 5 additions, 5 deletionsfs/xfs/xfs_qm.c
- fs/xfs/xfs_reflink.c 1 addition, 1 deletionfs/xfs/xfs_reflink.c
- fs/xfs/xfs_rtalloc.c 1 addition, 1 deletionfs/xfs/xfs_rtalloc.c
Please register or sign in to comment