diff options
author | Dave Chinner <dchinner@redhat.com> | 2011-09-18 20:40:46 +0000 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-10-11 21:15:03 -0500 |
commit | 5b777ad517ee75d3bb8d67c142d808822e46601b (patch) | |
tree | 0f73fed092f3772d51890f3e90fe518460522e3b /fs/xfs/xfs_da_btree.c | |
parent | 5c8ed2021ff291f5e399a9b43c4f699b2fc58fbb (diff) | |
download | linux-rpi3-5b777ad517ee75d3bb8d67c142d808822e46601b.tar.gz linux-rpi3-5b777ad517ee75d3bb8d67c142d808822e46601b.tar.bz2 linux-rpi3-5b777ad517ee75d3bb8d67c142d808822e46601b.zip |
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>
Diffstat (limited to 'fs/xfs/xfs_da_btree.c')
-rw-r--r-- | fs/xfs/xfs_da_btree.c | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c index 44dfa39099ef..70a5f580e5ed 100644 --- a/fs/xfs/xfs_da_btree.c +++ b/fs/xfs/xfs_da_btree.c @@ -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 = ↦ - 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; |