Skip to content

Commit c2adcfa

Browse files
Christoph HellwigChandan Babu R
authored andcommitted
xfs: move xfs_rtget_summary to xfs_rtbitmap.c
xfs_rtmodify_summary_int is only used inside xfs_rtbitmap.c and to implement xfs_rtget_summary. Move xfs_rtget_summary to xfs_rtbitmap.c as the exported API and mark xfs_rtmodify_summary_int static. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
1 parent a3e48f6 commit c2adcfa

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

fs/xfs/libxfs/xfs_rtbitmap.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,20 @@ xfs_rtmodify_summary(
519519
return xfs_rtmodify_summary_int(args, log, bbno, delta, NULL);
520520
}
521521

522+
/*
523+
* Read and return the summary information for a given extent size, bitmap block
524+
* combination.
525+
*/
526+
int
527+
xfs_rtget_summary(
528+
struct xfs_rtalloc_args *args,
529+
int log, /* log2 of extent size */
530+
xfs_fileoff_t bbno, /* bitmap block number */
531+
xfs_suminfo_t *sum) /* out: summary info for this block */
532+
{
533+
return xfs_rtmodify_summary_int(args, log, bbno, 0, sum);
534+
}
535+
522536
/* Log rtbitmap block from the word @from to the byte before @next. */
523537
static inline void
524538
xfs_trans_log_rtbitmap(

fs/xfs/libxfs/xfs_rtbitmap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ int xfs_rtfind_forw(struct xfs_rtalloc_args *args, xfs_rtxnum_t start,
321321
xfs_rtxnum_t limit, xfs_rtxnum_t *rtblock);
322322
int xfs_rtmodify_range(struct xfs_rtalloc_args *args, xfs_rtxnum_t start,
323323
xfs_rtxlen_t len, int val);
324-
int xfs_rtmodify_summary_int(struct xfs_rtalloc_args *args, int log,
325-
xfs_fileoff_t bbno, int delta, xfs_suminfo_t *sum);
324+
int xfs_rtget_summary(struct xfs_rtalloc_args *args, int log,
325+
xfs_fileoff_t bbno, xfs_suminfo_t *sum);
326326
int xfs_rtmodify_summary(struct xfs_rtalloc_args *args, int log,
327327
xfs_fileoff_t bbno, int delta);
328328
int xfs_rtfree_range(struct xfs_rtalloc_args *args, xfs_rtxnum_t start,

fs/xfs/xfs_rtalloc.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,6 @@
2323
#include "xfs_rtbitmap.h"
2424
#include "xfs_quota.h"
2525

26-
/*
27-
* Read and return the summary information for a given extent size,
28-
* bitmap block combination.
29-
* Keeps track of a current summary block, so we don't keep reading
30-
* it from the buffer cache.
31-
*/
32-
static int
33-
xfs_rtget_summary(
34-
struct xfs_rtalloc_args *args,
35-
int log, /* log2 of extent size */
36-
xfs_fileoff_t bbno, /* bitmap block number */
37-
xfs_suminfo_t *sum) /* out: summary info for this block */
38-
{
39-
return xfs_rtmodify_summary_int(args, log, bbno, 0, sum);
40-
}
41-
4226
/*
4327
* Return whether there are any free extents in the size range given
4428
* by low and high, for the bitmap block bbno.

0 commit comments

Comments
 (0)