[PATCH] liveupdate: Remove redundant INIT_LIST_HEAD in luo_session_alloc

Hongfu Li posted 1 patch 1 week, 4 days ago
kernel/liveupdate/luo_session.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] liveupdate: Remove redundant INIT_LIST_HEAD in luo_session_alloc
Posted by Hongfu Li 1 week, 4 days ago
From: Hongfu Li <lihongfu@kylinos.cn>

luo_session_alloc() calls INIT_LIST_HEAD(&session->file_set.files_list)
followed immediately by luo_file_set_init(), which also performs
INIT_LIST_HEAD() on the same list head. Remove the duplicate call.

Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
---
 kernel/liveupdate/luo_session.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/liveupdate/luo_session.c b/kernel/liveupdate/luo_session.c
index b79b2a488974..90ae3810e6cf 100644
--- a/kernel/liveupdate/luo_session.c
+++ b/kernel/liveupdate/luo_session.c
@@ -154,7 +154,6 @@ static struct luo_session *luo_session_alloc(const char *name)
 		return ERR_PTR(-ENOMEM);
 
 	strscpy(session->name, name, sizeof(session->name));
-	INIT_LIST_HEAD(&session->file_set.files_list);
 	luo_file_set_init(&session->file_set);
 	INIT_LIST_HEAD(&session->list);
 	mutex_init(&session->mutex);
-- 
2.54.0
Re: [PATCH] liveupdate: Remove redundant INIT_LIST_HEAD in luo_session_alloc
Posted by Mike Rapoport 1 week, 3 days ago
On Tue, 14 Jul 2026 15:40:56 +0800, Hongfu Li wrote:
> liveupdate: Remove redundant INIT_LIST_HEAD in luo_session_alloc

Applied to misc branch of liveupdate/linux.git tree, thanks!

[1/1] liveupdate: Remove redundant INIT_LIST_HEAD in luo_session_alloc
      commit: 4867ab462d8d69e73c239b9a1a98e42a222f17a2

tree: https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux
branch: misc

--
Sincerely yours,
Mike.
Re: [PATCH] liveupdate: Remove redundant INIT_LIST_HEAD in luo_session_alloc
Posted by Pratyush Yadav 1 week, 4 days ago
On Tue, Jul 14 2026, Hongfu Li wrote:

> From: Hongfu Li <lihongfu@kylinos.cn>
>
> luo_session_alloc() calls INIT_LIST_HEAD(&session->file_set.files_list)
> followed immediately by luo_file_set_init(), which also performs
> INIT_LIST_HEAD() on the same list head. Remove the duplicate call.
>
> Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>

Reviewed-by: Pratyush Yadav <pratyush@kernel.org>

[...]

-- 
Regards,
Pratyush Yadav