Re: [PATCH 1/2] mm/swap: fix stale comment on swap_info_struct::cluster_info

From: Youngjun Park

Date: Tue Aug 04 2026 - 13:59:38 EST


On Tue, Aug 04, 2026 at 05:51:52PM +0800, Barry Song wrote:
> On Tue, Jul 28, 2026 at 11:59 PM Youngjun Park <her0gyugyu@xxxxxxxxx> wrote:
> >
> > From: Youngjun Park <her0gyugyu@xxxxxxxxx>
> >
> > From: Youngjun Park <youngjun.park@xxxxxxx>
> >
> > setup_swap_clusters_info() allocates cluster_info for every swap area,
> > not only for SSDs.
> >
> > Signed-off-by: Youngjun Park <youngjun.park@xxxxxxx>
> > ---
> > include/linux/swap.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/linux/swap.h b/include/linux/swap.h
> > index 2cb1d29307c5..e12c73891b48 100644
> > --- a/include/linux/swap.h
> > +++ b/include/linux/swap.h
> > @@ -246,7 +246,7 @@ struct swap_info_struct {
> > struct plist_node list; /* entry in swap_active_head */
> > signed char type; /* strange name for an index */
> > unsigned int max; /* size of this swap device */
> > - struct swap_cluster_info *cluster_info; /* cluster info. Only for SSD */
> > + struct swap_cluster_info *cluster_info; /* one per cluster, on every device */
>
> Do we still need "on every device", since it is on every device?
>
> Thanks
> Barry

Hi Barry!

Right, Will trim it to /* one per cluster *

Youngjun