xfs: remove xfs_bmapi_single()

Now we have xfs_bmapi_read, there is no need for xfs_bmapi_single().
Change the remaining caller over and kill the function.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
Dave Chinner
2011-09-18 20:40:46 +00:00
committed by Alex Elder
parent 5c8ed2021f
commit 5b777ad517
4 changed files with 19 additions and 112 deletions

View File

@@ -856,33 +856,23 @@ xfs_rtbuf_get(
xfs_buf_t **bpp) /* output: buffer for the block */
{
xfs_buf_t *bp; /* block buffer, result */
xfs_daddr_t d; /* disk addr of block */
int error; /* error value */
xfs_fsblock_t fsb; /* fs block number for block */
xfs_inode_t *ip; /* bitmap or summary inode */
xfs_bmbt_irec_t map;
int nmap;
int error; /* error value */
ip = issum ? mp->m_rsumip : mp->m_rbmip;
/*
* Map from the file offset (block) and inode number to the
* file system block.
*/
error = xfs_bmapi_single(tp, ip, XFS_DATA_FORK, &fsb, block);
if (error) {
error = xfs_bmapi_read(ip, block, 1, &map, &nmap, XFS_DATA_FORK);
if (error)
return error;
}
ASSERT(fsb != NULLFSBLOCK);
/*
* Convert to disk address for buffer cache.
*/
d = XFS_FSB_TO_DADDR(mp, fsb);
/*
* Read the buffer.
*/
error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, d,
ASSERT(map.br_startblock != NULLFSBLOCK);
error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp,
XFS_FSB_TO_DADDR(mp, map.br_startblock),
mp->m_bsize, 0, &bp);
if (error) {
if (error)
return error;
}
ASSERT(!xfs_buf_geterror(bp));
*bpp = bp;
return 0;