[PATCH v3 2/2] mm: swap.h: Remove deleted field from comments

Chris Li posted 2 patches 1 month, 3 weeks ago
[PATCH v3 2/2] mm: swap.h: Remove deleted field from comments
Posted by Chris Li 1 month, 3 weeks ago
The comment for struct swap_info_struct.lock incorrectly mentions fields
that have already been deleted from the structure.

Updates the comments to accurately reflect the current struct
swap_info_struct.

There is no functional change.

Signed-off-by: Chris Li <chrisl@kernel.org>
---
 include/linux/swap.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/include/linux/swap.h b/include/linux/swap.h
index a060d102e0d1..c2da85cb7fe7 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -320,11 +320,8 @@ struct swap_info_struct {
 	struct completion comp;		/* seldom referenced */
 	spinlock_t lock;		/*
 					 * protect map scan related fields like
-					 * swap_map, lowest_bit, highest_bit,
-					 * inuse_pages, cluster_next,
-					 * cluster_nr, lowest_alloc,
-					 * highest_alloc, free/discard cluster
-					 * list. other fields are only changed
+					 * swap_map, inuse_pages and all cluster
+					 * lists. other fields are only changed
 					 * at swapon/swapoff, so are protected
 					 * by swap_lock. changing flags need
 					 * hold this lock and swap_lock. If

-- 
2.43.0
Re: [PATCH v3 2/2] mm: swap.h: Remove deleted field from comments
Posted by Nhat Pham 1 month, 3 weeks ago
On Tue, Aug 12, 2025 at 12:11 AM Chris Li <chrisl@kernel.org> wrote:
>
> The comment for struct swap_info_struct.lock incorrectly mentions fields
> that have already been deleted from the structure.
>
> Updates the comments to accurately reflect the current struct
> swap_info_struct.
>
> There is no functional change.
>
> Signed-off-by: Chris Li <chrisl@kernel.org>

Acked-by: Nhat Pham <nphamcs@gmail.com>
Re: [PATCH v3 2/2] mm: swap.h: Remove deleted field from comments
Posted by Barry Song 1 month, 3 weeks ago
On Tue, Aug 12, 2025 at 3:11 PM Chris Li <chrisl@kernel.org> wrote:
>
> The comment for struct swap_info_struct.lock incorrectly mentions fields
> that have already been deleted from the structure.
>
> Updates the comments to accurately reflect the current struct
> swap_info_struct.
>
> There is no functional change.
>
> Signed-off-by: Chris Li <chrisl@kernel.org>

Reviewed-by: Barry Song <baohua@kernel.org>

Thanks
Barry
Re: [PATCH v3 2/2] mm: swap.h: Remove deleted field from comments
Posted by Kairui Song 1 month, 3 weeks ago
On Tue, Aug 12, 2025 at 3:26 PM Chris Li <chrisl@kernel.org> wrote:
>
> The comment for struct swap_info_struct.lock incorrectly mentions fields
> that have already been deleted from the structure.
>
> Updates the comments to accurately reflect the current struct
> swap_info_struct.
>
> There is no functional change.
>
> Signed-off-by: Chris Li <chrisl@kernel.org>
> ---
>  include/linux/swap.h | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/include/linux/swap.h b/include/linux/swap.h
> index a060d102e0d1..c2da85cb7fe7 100644
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -320,11 +320,8 @@ struct swap_info_struct {
>         struct completion comp;         /* seldom referenced */
>         spinlock_t lock;                /*
>                                          * protect map scan related fields like
> -                                        * swap_map, lowest_bit, highest_bit,
> -                                        * inuse_pages, cluster_next,
> -                                        * cluster_nr, lowest_alloc,
> -                                        * highest_alloc, free/discard cluster
> -                                        * list. other fields are only changed
> +                                        * swap_map, inuse_pages and all cluster
> +                                        * lists. other fields are only changed
>                                          * at swapon/swapoff, so are protected
>                                          * by swap_lock. changing flags need
>                                          * hold this lock and swap_lock. If
>
> --
> 2.43.0
>

Thanks.

Reviewed-by: Kairui Song <kasong@tencent.com>