* [PATCH -next] gfs2: Use list_move_tail instead of list_del/list_add_tail
@ 2021-06-08 3:12 Baokun Li
2021-06-09 10:51 ` Andreas Gruenbacher
0 siblings, 1 reply; 2+ messages in thread
From: Baokun Li @ 2021-06-08 3:12 UTC (permalink / raw)
To: linux-kernel, Bob Peterson, Andreas Gruenbacher
Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3, libaokun1,
cluster-devel, kernel-janitors, Hulk Robot
Using list_move_tail() instead of list_del() + list_add_tail().
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
---
fs/gfs2/glock.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index f6cae2ee1c83..902dd7385462 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -212,8 +212,7 @@ void gfs2_glock_add_to_lru(struct gfs2_glock *gl)
spin_lock(&lru_lock);
- list_del(&gl->gl_lru);
- list_add_tail(&gl->gl_lru, &lru_list);
+ list_move_tail(&gl->gl_lru, &lru_list);
if (!test_bit(GLF_LRU, &gl->gl_flags)) {
set_bit(GLF_LRU, &gl->gl_flags);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] gfs2: Use list_move_tail instead of list_del/list_add_tail
2021-06-08 3:12 [PATCH -next] gfs2: Use list_move_tail instead of list_del/list_add_tail Baokun Li
@ 2021-06-09 10:51 ` Andreas Gruenbacher
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Gruenbacher @ 2021-06-09 10:51 UTC (permalink / raw)
To: Baokun Li
Cc: LKML, Bob Peterson, weiyongjun1, yuehaibing, yangjihong1,
yukuai3, cluster-devel, kernel-janitors, Hulk Robot
On Tue, Jun 8, 2021 at 5:23 AM Baokun Li <libaokun1@huawei.com> wrote:
> Using list_move_tail() instead of list_del() + list_add_tail().
Thanks, I'll add that to for-next.
Andreas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-09 10:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 3:12 [PATCH -next] gfs2: Use list_move_tail instead of list_del/list_add_tail Baokun Li
2021-06-09 10:51 ` Andreas Gruenbacher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).