From: Wei Yongjun <[email protected]>

Using list_move_tail() instead of list_del() + list_add_tail().

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <[email protected]>
---
 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 fb5ffe9..fbea0de 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -1792,8 +1792,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);
 }
 
 static void name_cache_clean_unused(struct send_ctx *sctx)


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to