Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3749734pxj; Mon, 7 Jun 2021 20:05:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxF4Jrz7/0SmR4inVpaTiaBkL8JS/Ui/L8yLYI9yuS2gJvPNWfi0O+ClWv289MYJ05ZBGOk X-Received: by 2002:a17:906:fcb4:: with SMTP id qw20mr21218892ejb.344.1623121520107; Mon, 07 Jun 2021 20:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623121520; cv=none; d=google.com; s=arc-20160816; b=KKn+DGslknJQWQa2Ia/EodL9CHpX3STbEz//1XHtYtaA9OS3qBfZkhiz+E6qpghWxq EAxVfLFzbMKI6nX8bGS6PQbA3lHjz5yARPAc0QVcoUAK6CNycfNwBy/DOunr5PgecXxc vD+QRtJEdXTgF5+ocyQkmpm9K4HhtwG6LL6JIFZV843iAVheGh+/t9+MF2JNwsQcc1ea /+SJsiI5lc+aGkdEYlp5f4QCbZbuou2QKRwqEYBZ+6D2ANka9mzQgip4xklBTn+L8ezs FqQ/jjvn3r4hZHoXO7EAa/XupzwonU9PPIfn+0kDo9rfsLZm0K4YdJTqwrp9/gWutynG jjDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=JAa3tQ1EjNiIMcgzR5NdomDgSPtq4d4n1PoQPrxPW8A=; b=ZGb/VnKh/WBqzHIcQmY5jaE8hQlKUDjJezBaVZNi81jpMe2Zjfpx1IlShO/QNQw+Ut krKhuu1HkDcOnd5vd0hmHXqbz404gRoY8+DG+8lJl/M/Al0d0r/FMbWP1EYhVJzOVg4R oOYAxjoKhXZUvxmNt5+UFe4XcJm/HbVPvwELlL+Cm1TPv03whJiEZg6O4EpHPHph2kgd bljtsyYQMGlP0lDJ3OIgsT++jgUplr3kSFaG9/VpiMeTNcrkU9df1ddb/eDGNGWeERC1 Ayw4eDDYP914pip8dsKzqQ5GVIG1BjutzATggx7WmAeytEo54fRdG3OA9fJHpV6Mxl4W OsNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de5si14883372edb.595.2021.06.07.20.04.57; Mon, 07 Jun 2021 20:05:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231148AbhFHDFE (ORCPT + 99 others); Mon, 7 Jun 2021 23:05:04 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:4505 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230517AbhFHDFD (ORCPT ); Mon, 7 Jun 2021 23:05:03 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4FzZjd2PPdzZfZq; Tue, 8 Jun 2021 11:00:21 +0800 (CST) Received: from dggpeml500020.china.huawei.com (7.185.36.88) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 8 Jun 2021 11:03:10 +0800 Received: from huawei.com (10.175.127.227) by dggpeml500020.china.huawei.com (7.185.36.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 8 Jun 2021 11:03:09 +0800 From: Baokun Li To: , Chris Mason , Josef Bacik , David Sterba CC: , , , , , , , Hulk Robot Subject: [PATCH -next] btrfs: send: use list_move_tail instead of list_del/list_add_tail Date: Tue, 8 Jun 2021 11:12:20 +0800 Message-ID: <20210608031220.2822257-1-libaokun1@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500020.china.huawei.com (7.185.36.88) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using list_move_tail() instead of list_del() + list_add_tail(). Reported-by: Hulk Robot Signed-off-by: Baokun Li --- 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); } /*