diff options
author | Dave Chinner <dchinner@redhat.com> | 2011-09-18 16:40:46 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-10-11 22:15:03 -0400 |
commit | 5b777ad517ee75d3bb8d67c142d808822e46601b (patch) | |
tree | 0f73fed092f3772d51890f3e90fe518460522e3b /fs/xfs/xfs_rtalloc.c | |
parent | 5c8ed2021ff291f5e399a9b43c4f699b2fc58fbb (diff) |
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_rtalloc.c')
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 35561a511b57..e5f40c6460b2 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c | |||
@@ -856,33 +856,23 @@ xfs_rtbuf_get( | |||
856 | xfs_buf_t **bpp) /* output: buffer for the block */ | 856 | xfs_buf_t **bpp) /* output: buffer for the block */ |
857 | { | 857 | { |
858 | xfs_buf_t *bp; /* block buffer, result */ | 858 | xfs_buf_t *bp; /* block buffer, result */ |
859 | xfs_daddr_t d; /* disk addr of block */ | ||
860 | int error; /* error value */ | ||
861 | xfs_fsblock_t fsb; /* fs block number for block */ | ||
862 | xfs_inode_t *ip; /* bitmap or summary inode */ | 859 | xfs_inode_t *ip; /* bitmap or summary inode */ |
860 | xfs_bmbt_irec_t map; | ||
861 | int nmap; | ||
862 | int error; /* error value */ | ||
863 | 863 | ||
864 | ip = issum ? mp->m_rsumip : mp->m_rbmip; | 864 | ip = issum ? mp->m_rsumip : mp->m_rbmip; |
865 | /* | 865 | |
866 | * Map from the file offset (block) and inode number to the | 866 | error = xfs_bmapi_read(ip, block, 1, &map, &nmap, XFS_DATA_FORK); |
867 | * file system block. | 867 | if (error) |
868 | */ | ||
869 | error = xfs_bmapi_single(tp, ip, XFS_DATA_FORK, &fsb, block); | ||
870 | if (error) { | ||
871 | return error; | 868 | return error; |
872 | } | 869 | |
873 | ASSERT(fsb != NULLFSBLOCK); | 870 | ASSERT(map.br_startblock != NULLFSBLOCK); |
874 | /* | 871 | error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, |
875 | * Convert to disk address for buffer cache. | 872 | XFS_FSB_TO_DADDR(mp, map.br_startblock), |
876 | */ | ||
877 | d = XFS_FSB_TO_DADDR(mp, fsb); | ||
878 | /* | ||
879 | * Read the buffer. | ||
880 | */ | ||
881 | error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, d, | ||
882 | mp->m_bsize, 0, &bp); | 873 | mp->m_bsize, 0, &bp); |
883 | if (error) { | 874 | if (error) |
884 | return error; | 875 | return error; |
885 | } | ||
886 | ASSERT(!xfs_buf_geterror(bp)); | 876 | ASSERT(!xfs_buf_geterror(bp)); |
887 | *bpp = bp; | 877 | *bpp = bp; |
888 | return 0; | 878 | return 0; |