]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_rtalloc.c
[XFS] remove most calls to VN_RELE
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_rtalloc.c
index b3a5f07bd0734cf189ccf00e076931906dae771d..9cd6471cd60fd6a8c25dd0bea63bff353121614c 100644 (file)
@@ -44,6 +44,7 @@
 #include "xfs_rw.h"
 #include "xfs_inode_item.h"
 #include "xfs_trans_space.h"
+#include "xfs_utils.h"
 
 
 /*
@@ -1882,11 +1883,13 @@ xfs_growfs_rt(
            (nrblocks = in->newblocks) <= sbp->sb_rblocks ||
            (sbp->sb_rblocks && (in->extsize != sbp->sb_rextsize)))
                return XFS_ERROR(EINVAL);
+       if ((error = xfs_sb_validate_fsb_count(sbp, nrblocks)))
+               return error;
        /*
         * Read in the last block of the device, make sure it exists.
         */
        error = xfs_read_buf(mp, mp->m_rtdev_targp,
-                       XFS_FSB_TO_BB(mp, in->newblocks - 1),
+                       XFS_FSB_TO_BB(mp, nrblocks - 1),
                        XFS_FSB_TO_BB(mp, 1), 0, &bp);
        if (error)
                return error;
@@ -2276,7 +2279,7 @@ xfs_rtmount_inodes(
        ASSERT(sbp->sb_rsumino != NULLFSINO);
        error = xfs_iget(mp, NULL, sbp->sb_rsumino, 0, 0, &mp->m_rsumip, 0);
        if (error) {
-               VN_RELE(XFS_ITOV(mp->m_rbmip));
+               IRELE(mp->m_rbmip);
                return error;
        }
        ASSERT(mp->m_rsumip != NULL);