Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp524179imm; Wed, 3 Oct 2018 22:01:55 -0700 (PDT) X-Google-Smtp-Source: ACcGV63wdIVOXK12Dlv1qj5OpJUDBctys3LT/F7osKK0pkgtRRIEGLg8nD9aG4xqZeBOjrBa3NUh X-Received: by 2002:a63:2c8a:: with SMTP id s132-v6mr4055932pgs.73.1538629315819; Wed, 03 Oct 2018 22:01:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538629315; cv=none; d=google.com; s=arc-20160816; b=wGZmjZwKsPL1gGEiLKYSZ+PW2acnwNGAWVmYidKfbph1M77iXCjGK4rPb2a1F4xyRM hpPG4gFcuWGW/YaShzXcOQfJfLSWBqYY4CS+uthp7M1w/bYYK5hJvi34m/J2ESbrHZc6 YODvpBNq64wTUg7KIk63MnlyALnJdK4CqWQCh+CLeq0QbiPjfMLAkq+5xnlLb+CSlZ++ gGXdi860pFuuY1tEn68oLuNdyYuzeznkZ9/tJwYXVznPIWHpaisf6tA68k+owgS5khbq ncj0MMdpXuwvP9CgbGyHZmCLyXUkPNdlBAu40iMrN0KyhfOyQ28OrcvcTkS+8vYR8Zfs wLGg== 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=WOeTHdBKIGx4W8A5y5rdNuGMfRPLM5BmcelddfZksws=; b=tVXEwXqz1SG1NL02LWJu4za4PNDmTzUpha1+h8Xc3RPASSuWd6j/b0Cf3Tbmc3msO3 wR2wEscIVpSvwfg909OmSq9wdpVxM7v6lU6cCbZ+QA5ZnP4eTuWrUNCc7T33EmSmBkWJ DLvdjCSafB8imzHdFxgExKmk9VV5w2hNvYSDs67ouGeDhhR50vKKgebirQLTb7qUkRfl qJQAHMo3DG6OWFgtAGaij0Y4wkFrpggDaqfh97aToJj+IZ9b4usQpccqdSh3rb9HRDno ixDoDKPFQeTGcDOOC9SdA400v+2TbGRpZ11lI6m3+P6mAJLFkwfepUZxU7VW8f8u04Gr Diqw== 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 8-v6si3769978pgx.37.2018.10.03.22.01.39; Wed, 03 Oct 2018 22:01:55 -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 S1727058AbeJDLxB (ORCPT + 99 others); Thu, 4 Oct 2018 07:53:01 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13596 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726735AbeJDLxA (ORCPT ); Thu, 4 Oct 2018 07:53:00 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id A106D93D90F1B; Thu, 4 Oct 2018 13:00:50 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.399.0; Thu, 4 Oct 2018 13:00:48 +0800 From: zhong jiang To: CC: , , , , , Subject: [PATCHv2] btrfs: list usage cleanup Date: Thu, 4 Oct 2018 12:48:27 +0800 Message-ID: <1538628507-32593-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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 094cc144..30e7e12 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -2075,8 +2075,8 @@ 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); + /* delete from sctx->name_cache_list and add as its tail */ + list_move_tail(&nce->list, &sctx->name_cache_list); } /* -- 1.7.12.4