diff options
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index ca12acb90394..cf0bb9c1d621 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -1291,7 +1291,7 @@ xfs_file_last_byte( | |||
1291 | xfs_fileoff_t size_last_block; | 1291 | xfs_fileoff_t size_last_block; |
1292 | int error; | 1292 | int error; |
1293 | 1293 | ||
1294 | ASSERT(ismrlocked(&(ip->i_iolock), MR_UPDATE | MR_ACCESS)); | 1294 | ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL|XFS_IOLOCK_SHARED)); |
1295 | 1295 | ||
1296 | mp = ip->i_mount; | 1296 | mp = ip->i_mount; |
1297 | /* | 1297 | /* |
@@ -1402,7 +1402,7 @@ xfs_itruncate_start( | |||
1402 | bhv_vnode_t *vp; | 1402 | bhv_vnode_t *vp; |
1403 | int error = 0; | 1403 | int error = 0; |
1404 | 1404 | ||
1405 | ASSERT(ismrlocked(&ip->i_iolock, MR_UPDATE) != 0); | 1405 | ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL)); |
1406 | ASSERT((new_size == 0) || (new_size <= ip->i_size)); | 1406 | ASSERT((new_size == 0) || (new_size <= ip->i_size)); |
1407 | ASSERT((flags == XFS_ITRUNC_DEFINITE) || | 1407 | ASSERT((flags == XFS_ITRUNC_DEFINITE) || |
1408 | (flags == XFS_ITRUNC_MAYBE)); | 1408 | (flags == XFS_ITRUNC_MAYBE)); |
@@ -1528,8 +1528,7 @@ xfs_itruncate_finish( | |||
1528 | xfs_bmap_free_t free_list; | 1528 | xfs_bmap_free_t free_list; |
1529 | int error; | 1529 | int error; |
1530 | 1530 | ||
1531 | ASSERT(ismrlocked(&ip->i_iolock, MR_UPDATE) != 0); | 1531 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_IOLOCK_EXCL)); |
1532 | ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE) != 0); | ||
1533 | ASSERT((new_size == 0) || (new_size <= ip->i_size)); | 1532 | ASSERT((new_size == 0) || (new_size <= ip->i_size)); |
1534 | ASSERT(*tp != NULL); | 1533 | ASSERT(*tp != NULL); |
1535 | ASSERT((*tp)->t_flags & XFS_TRANS_PERM_LOG_RES); | 1534 | ASSERT((*tp)->t_flags & XFS_TRANS_PERM_LOG_RES); |
@@ -1780,8 +1779,7 @@ xfs_igrow_start( | |||
1780 | xfs_fsize_t new_size, | 1779 | xfs_fsize_t new_size, |
1781 | cred_t *credp) | 1780 | cred_t *credp) |
1782 | { | 1781 | { |
1783 | ASSERT(ismrlocked(&(ip->i_lock), MR_UPDATE) != 0); | 1782 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_IOLOCK_EXCL)); |
1784 | ASSERT(ismrlocked(&(ip->i_iolock), MR_UPDATE) != 0); | ||
1785 | ASSERT(new_size > ip->i_size); | 1783 | ASSERT(new_size > ip->i_size); |
1786 | 1784 | ||
1787 | /* | 1785 | /* |
@@ -1809,8 +1807,7 @@ xfs_igrow_finish( | |||
1809 | xfs_fsize_t new_size, | 1807 | xfs_fsize_t new_size, |
1810 | int change_flag) | 1808 | int change_flag) |
1811 | { | 1809 | { |
1812 | ASSERT(ismrlocked(&(ip->i_lock), MR_UPDATE) != 0); | 1810 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_IOLOCK_EXCL)); |
1813 | ASSERT(ismrlocked(&(ip->i_iolock), MR_UPDATE) != 0); | ||
1814 | ASSERT(ip->i_transp == tp); | 1811 | ASSERT(ip->i_transp == tp); |
1815 | ASSERT(new_size > ip->i_size); | 1812 | ASSERT(new_size > ip->i_size); |
1816 | 1813 | ||
@@ -2287,7 +2284,7 @@ xfs_ifree( | |||
2287 | xfs_dinode_t *dip; | 2284 | xfs_dinode_t *dip; |
2288 | xfs_buf_t *ibp; | 2285 | xfs_buf_t *ibp; |
2289 | 2286 | ||
2290 | ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE)); | 2287 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); |
2291 | ASSERT(ip->i_transp == tp); | 2288 | ASSERT(ip->i_transp == tp); |
2292 | ASSERT(ip->i_d.di_nlink == 0); | 2289 | ASSERT(ip->i_d.di_nlink == 0); |
2293 | ASSERT(ip->i_d.di_nextents == 0); | 2290 | ASSERT(ip->i_d.di_nextents == 0); |
@@ -2746,7 +2743,7 @@ void | |||
2746 | xfs_ipin( | 2743 | xfs_ipin( |
2747 | xfs_inode_t *ip) | 2744 | xfs_inode_t *ip) |
2748 | { | 2745 | { |
2749 | ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE)); | 2746 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); |
2750 | 2747 | ||
2751 | atomic_inc(&ip->i_pincount); | 2748 | atomic_inc(&ip->i_pincount); |
2752 | } | 2749 | } |
@@ -2779,7 +2776,7 @@ __xfs_iunpin_wait( | |||
2779 | { | 2776 | { |
2780 | xfs_inode_log_item_t *iip = ip->i_itemp; | 2777 | xfs_inode_log_item_t *iip = ip->i_itemp; |
2781 | 2778 | ||
2782 | ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE | MR_ACCESS)); | 2779 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_ILOCK_SHARED)); |
2783 | if (atomic_read(&ip->i_pincount) == 0) | 2780 | if (atomic_read(&ip->i_pincount) == 0) |
2784 | return; | 2781 | return; |
2785 | 2782 | ||
@@ -2829,7 +2826,7 @@ xfs_iextents_copy( | |||
2829 | xfs_fsblock_t start_block; | 2826 | xfs_fsblock_t start_block; |
2830 | 2827 | ||
2831 | ifp = XFS_IFORK_PTR(ip, whichfork); | 2828 | ifp = XFS_IFORK_PTR(ip, whichfork); |
2832 | ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE|MR_ACCESS)); | 2829 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_ILOCK_SHARED)); |
2833 | ASSERT(ifp->if_bytes > 0); | 2830 | ASSERT(ifp->if_bytes > 0); |
2834 | 2831 | ||
2835 | nrecs = ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t); | 2832 | nrecs = ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t); |
@@ -3132,7 +3129,7 @@ xfs_iflush( | |||
3132 | 3129 | ||
3133 | XFS_STATS_INC(xs_iflush_count); | 3130 | XFS_STATS_INC(xs_iflush_count); |
3134 | 3131 | ||
3135 | ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE|MR_ACCESS)); | 3132 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_ILOCK_SHARED)); |
3136 | ASSERT(issemalocked(&(ip->i_flock))); | 3133 | ASSERT(issemalocked(&(ip->i_flock))); |
3137 | ASSERT(ip->i_d.di_format != XFS_DINODE_FMT_BTREE || | 3134 | ASSERT(ip->i_d.di_format != XFS_DINODE_FMT_BTREE || |
3138 | ip->i_d.di_nextents > ip->i_df.if_ext_max); | 3135 | ip->i_d.di_nextents > ip->i_df.if_ext_max); |
@@ -3297,7 +3294,7 @@ xfs_iflush_int( | |||
3297 | int first; | 3294 | int first; |
3298 | #endif | 3295 | #endif |
3299 | 3296 | ||
3300 | ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE|MR_ACCESS)); | 3297 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_ILOCK_SHARED)); |
3301 | ASSERT(issemalocked(&(ip->i_flock))); | 3298 | ASSERT(issemalocked(&(ip->i_flock))); |
3302 | ASSERT(ip->i_d.di_format != XFS_DINODE_FMT_BTREE || | 3299 | ASSERT(ip->i_d.di_format != XFS_DINODE_FMT_BTREE || |
3303 | ip->i_d.di_nextents > ip->i_df.if_ext_max); | 3300 | ip->i_d.di_nextents > ip->i_df.if_ext_max); |