X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=fs%2Fxfs%2Fxfs_rtalloc.c;h=47082c01872d0621f0c8499862e16c6ef33d2aee;hb=c78bad11fbf1272ea021f56458025dc98486d6f4;hp=6fff19dc3cf96e8cb6d00fabe3dd88d176847f46;hpb=902b236c087bf021c94cc21a2b09d928c4156c2b;p=linux-2.6-omap-h63xx.git diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 6fff19dc3cf..47082c01872 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -150,7 +150,7 @@ xfs_growfs_rt_alloc( error = xfs_bmap_finish(&tp, &flist, &committed); if (error) goto error_exit; - xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); + xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); /* * Now we need to clear the allocated blocks. * Do this one block per transaction, to keep it simple. @@ -187,7 +187,7 @@ xfs_growfs_rt_alloc( /* * Commit the transaction. */ - xfs_trans_commit(tp, 0, NULL); + xfs_trans_commit(tp, 0); } /* * Go on to the next extent, if any. @@ -1882,11 +1882,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; @@ -2042,7 +2044,7 @@ xfs_growfs_rt( /* * Commit the transaction. */ - xfs_trans_commit(tp, 0, NULL); + xfs_trans_commit(tp, 0); } if (error)