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

@@ -1975,32 +1975,16 @@ xfs_da_do_buf(
/*
* Optimize the one-block case.
*/
if (nfsb == 1) {
xfs_fsblock_t fsb;
if ((error =
xfs_bmapi_single(trans, dp, whichfork, &fsb,
(xfs_fileoff_t)bno))) {
return error;
}
if (nfsb == 1)
mapp = &map;
if (fsb == NULLFSBLOCK) {
nmap = 0;
} else {
map.br_startblock = fsb;
map.br_startoff = (xfs_fileoff_t)bno;
map.br_blockcount = 1;
nmap = 1;
}
} else {
else
mapp = kmem_alloc(sizeof(*mapp) * nfsb, KM_SLEEP);
nmap = nfsb;
error = xfs_bmapi_read(dp, (xfs_fileoff_t)bno, nfsb,
mapp, &nmap,
xfs_bmapi_aflag(whichfork));
if (error)
goto exit0;
}
nmap = nfsb;
error = xfs_bmapi_read(dp, (xfs_fileoff_t)bno, nfsb, mapp,
&nmap, xfs_bmapi_aflag(whichfork));
if (error)
goto exit0;
} else {
map.br_startblock = XFS_DADDR_TO_FSB(mp, mappedbno);
map.br_startoff = (xfs_fileoff_t)bno;