xfs: Replace xfs_isilocked with xfs_assert_ilocked
[linux-2.6-microblaze.git] / fs / xfs / xfs_bmap_util.c
index cb2a4b9..2fe306f 100644 (file)
@@ -508,8 +508,8 @@ xfs_can_free_eofblocks(
         * Caller must either hold the exclusive io lock; or be inactivating
         * the inode, which guarantees there are no other users of the inode.
         */
-       ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL) ||
-              (VFS_I(ip)->i_state & I_FREEING));
+       if (!(VFS_I(ip)->i_state & I_FREEING))
+               xfs_assert_ilocked(ip, XFS_IOLOCK_EXCL);
 
        /* prealloc/delalloc exists only on regular files */
        if (!S_ISREG(VFS_I(ip)->i_mode))
@@ -965,8 +965,7 @@ xfs_collapse_file_space(
        xfs_fileoff_t           shift_fsb = XFS_B_TO_FSB(mp, len);
        bool                    done = false;
 
-       ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL));
-       ASSERT(xfs_isilocked(ip, XFS_MMAPLOCK_EXCL));
+       xfs_assert_ilocked(ip, XFS_IOLOCK_EXCL | XFS_MMAPLOCK_EXCL);
 
        trace_xfs_collapse_file_space(ip);
 
@@ -1035,8 +1034,7 @@ xfs_insert_file_space(
        xfs_fileoff_t           shift_fsb = XFS_B_TO_FSB(mp, len);
        bool                    done = false;
 
-       ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL));
-       ASSERT(xfs_isilocked(ip, XFS_MMAPLOCK_EXCL));
+       xfs_assert_ilocked(ip, XFS_IOLOCK_EXCL | XFS_MMAPLOCK_EXCL);
 
        trace_xfs_insert_file_space(ip);