xfs: move xfs_get_extsz_hint() and kill xfs_rw.h
[deliverable/linux.git] / fs / xfs / xfs_rtalloc.c
index 87323f1ded6466482f40b019d81fbbcc4905e400..92d4331cd4f1c118ea0a0087849d399a3948f230 100644 (file)
@@ -20,7 +20,6 @@
 #include "xfs_types.h"
 #include "xfs_bit.h"
 #include "xfs_log.h"
-#include "xfs_inum.h"
 #include "xfs_trans.h"
 #include "xfs_sb.h"
 #include "xfs_ag.h"
@@ -34,7 +33,6 @@
 #include "xfs_rtalloc.h"
 #include "xfs_fsops.h"
 #include "xfs_error.h"
-#include "xfs_rw.h"
 #include "xfs_inode_item.h"
 #include "xfs_trans_space.h"
 #include "xfs_utils.h"
@@ -183,6 +181,7 @@ error_cancel:
                oblocks = map.br_startoff + map.br_blockcount;
        }
        return 0;
+
 error:
        return error;
 }
@@ -1871,9 +1870,9 @@ xfs_growfs_rt(
        /*
         * Read in the last block of the device, make sure it exists.
         */
-       bp = xfs_buf_read_uncached(mp, mp->m_rtdev_targp,
+       bp = xfs_buf_read_uncached(mp->m_rtdev_targp,
                                XFS_FSB_TO_BB(mp, nrblocks - 1),
-                               XFS_FSB_TO_B(mp, 1), 0);
+                               XFS_FSB_TO_BB(mp, 1), 0);
        if (!bp)
                return EIO;
        xfs_buf_relse(bp);
@@ -2139,11 +2138,9 @@ xfs_rtfree_extent(
        xfs_buf_t       *sumbp;         /* summary file block buffer */
 
        mp = tp->t_mountp;
-       /*
-        * Synchronize by locking the bitmap inode.
-        */
-       xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL);
-       xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL);
+
+       ASSERT(mp->m_rbmip->i_itemp != NULL);
+       ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL));
 
 #if defined(__KERNEL__) && defined(DEBUG)
        /*
@@ -2220,9 +2217,9 @@ xfs_rtmount_init(
                        (unsigned long long) mp->m_sb.sb_rblocks);
                return XFS_ERROR(EFBIG);
        }
-       bp = xfs_buf_read_uncached(mp, mp->m_rtdev_targp,
+       bp = xfs_buf_read_uncached(mp->m_rtdev_targp,
                                        d - XFS_FSB_TO_BB(mp, 1),
-                                       XFS_FSB_TO_B(mp, 1), 0);
+                                       XFS_FSB_TO_BB(mp, 1), 0);
        if (!bp) {
                xfs_warn(mp, "realtime device size check failed");
                return EIO;
This page took 0.025363 seconds and 5 git commands to generate.