Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp480729imm; Wed, 26 Sep 2018 01:50:29 -0700 (PDT) X-Google-Smtp-Source: ACcGV63GCUoK+Ip8BItgq67kGKDAalSm2xBOp87wCknl/Jwl/Gz+7ndMPtCAmtasAFRE/Ze8TXch X-Received: by 2002:a63:1d3:: with SMTP id 202-v6mr4740744pgb.136.1537951829718; Wed, 26 Sep 2018 01:50:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537951829; cv=none; d=google.com; s=arc-20160816; b=Omk/kCUssBU7CWPLa0LWbtTgJfpBb7/olpS5bpORZ1sCW8cK77EG6Rd+pMDOGRAaiS DCiOxg9CupCvpFFYt5+3f5Rt5A3UT1uz0XOBy+JrPZ785jkly7GmT2DyUf3IjwQTsii1 BlSDu76PEFI+ZelJtIMaD9msM1iPqLWDhEKpEWiLMjKJfdZHwHI94owx9zuFQ1MKFfqi QOUjXVKALQqzFfkHTnHs0lL+WKZte/qSHcU36eXVO0kr1C38l/1PnzXk5HKSirgiNtZe hGODieh4Xt7rgN+MaRv/4fAZESbNaNDXsPUDS2MdBSgNDKJ1Yn3CJHhXJV1e1iKcLtdh UWgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=fphzYVakZpiyuj756liXPx7UZa+2u5DrNEMKv85qs3I=; b=x+rXpfC118ptWLSl8wtfeRmRfqhe6ycMbO55fCm15yhOiDj1SSFHjFGqzNnk20AKHV 2345Y6Sh0PMHTTCvNx/PSux2kYhgEK6YGdf7AgoIdb8KjNKoXrUDfZutXPgJueQG4JG6 imjTHz0UKgdjdrCFW73ACOO0YQjcSnJ3oeL+9ZRJpGNpE0kp6JZpQeoiu9sAMPwtzF/M Y+Yxb0rpabYSjhkeD8XGaGVAfA86UE0PMkJCghmsV8n6cQBJZelg9OoUzwwK0YMU8CRl 1Mg1syM0R97Tp62DQ/XJY68HvR1A5XAAYriktdcSAWqQ2tuyPEIuy+dxP85XUjt4rLGK 7vcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c75-v6si4858057pga.243.2018.09.26.01.50.14; Wed, 26 Sep 2018 01:50:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727630AbeIZPAJ (ORCPT + 99 others); Wed, 26 Sep 2018 11:00:09 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13120 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726593AbeIZPAJ (ORCPT ); Wed, 26 Sep 2018 11:00:09 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 3871D644D8620; Wed, 26 Sep 2018 16:48:15 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.399.0; Wed, 26 Sep 2018 16:48:12 +0800 From: zhong jiang To: CC: , , , Subject: [PATCH] btrfs: list usage cleanup Date: Wed, 26 Sep 2018 16:35:45 +0800 Message-ID: <1537950945-5627-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Trival cleanup, list_move_tail will implement the same function that list_del() + list_add_tail() will do. hence just replace them. Signed-off-by: zhong jiang --- 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 094cc144..d87f416 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -2075,8 +2075,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); } /* -- 1.7.12.4