kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] btrfs: send: use list_move_tail instead of list_del/list_add_tail
@ 2021-06-08  3:12 Baokun Li
  2021-06-08  5:16 ` Anand Jain
  0 siblings, 1 reply; 4+ messages in thread
From: Baokun Li @ 2021-06-08  3:12 UTC (permalink / raw)
  To: linux-kernel, Chris Mason, Josef Bacik, David Sterba
  Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3, libaokun1,
	linux-btrfs, 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/btrfs/send.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index bd69db72acc5..a0e51b2416a1 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -2083,8 +2083,7 @@ static struct name_cache_entry *name_cache_search(struct send_ctx *sctx,
  */
 static void name_cache_used(struct send_ctx *sctx, struct name_cache_entry *nce)
 {
-	list_del(&nce->list);
-	list_add_tail(&nce->list, &sctx->name_cache_list);
+	list_move_tail(&nce->list, &sctx->name_cache_list);
 }
 
 /*


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-11  6:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08  3:12 [PATCH -next] btrfs: send: use list_move_tail instead of list_del/list_add_tail Baokun Li
2021-06-08  5:16 ` Anand Jain
2021-06-08 14:12   ` David Sterba
2021-06-11  6:05     ` libaokun (A)

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).