On Tue, May 12, 2026 at 07:35:27AM +0200, Christoph Hellwig wrote: > struct swap_extent is only used inside of mm/swapfile.c, so move it > there. > > Signed-off-by: Christoph Hellwig <[email protected]>
Woo, information hiding! Reviewed-by: "Darrick J. Wong" <[email protected]> --D > --- > include/linux/swap.h | 15 --------------- > mm/swapfile.c | 15 +++++++++++++++ > 2 files changed, 15 insertions(+), 15 deletions(-) > > diff --git a/include/linux/swap.h b/include/linux/swap.h > index 916889738f08..95237ee065c2 100644 > --- a/include/linux/swap.h > +++ b/include/linux/swap.h > @@ -178,21 +178,6 @@ struct sysinfo; > struct writeback_control; > struct zone; > > -/* > - * A swap extent maps a range of a swapfile's PAGE_SIZE pages onto a range of > - * disk blocks. A rbtree of swap extents maps the entire swapfile (Where the > - * term `swapfile' refers to either a blockdevice or an IS_REG file). Apart > - * from setup, they're handled identically. > - * > - * We always assume that blocks are of size PAGE_SIZE. > - */ > -struct swap_extent { > - struct rb_node rb_node; > - pgoff_t start_page; > - pgoff_t nr_pages; > - sector_t start_block; > -}; > - > /* > * Max bad pages in the new format.. > */ > diff --git a/mm/swapfile.c b/mm/swapfile.c > index 26852c2ad36e..c0479533f9ef 100644 > --- a/mm/swapfile.c > +++ b/mm/swapfile.c > @@ -260,6 +260,21 @@ static int __try_to_reclaim_swap(struct swap_info_struct > *si, > return ret; > } > > +/* > + * A swap extent maps a range of a swapfile's PAGE_SIZE pages onto a range of > + * disk blocks. A rbtree of swap extents maps the entire swapfile (Where the > + * term `swapfile' refers to either a blockdevice or an IS_REG file). Apart > + * from setup, they're handled identically. > + * > + * We always assume that blocks are of size PAGE_SIZE. > + */ > +struct swap_extent { > + struct rb_node rb_node; > + pgoff_t start_page; > + pgoff_t nr_pages; > + sector_t start_block; > +}; > + > static inline struct swap_extent *first_se(struct swap_info_struct *sis) > { > struct rb_node *rb = rb_first(&sis->swap_extent_root); > -- > 2.53.0 > > _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
