From patchwork Wed Sep 26 08:35:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhong jiang X-Patchwork-Id: 10615411 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE5AA112B for ; Wed, 26 Sep 2018 08:48:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D00842959C for ; Wed, 26 Sep 2018 08:48:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF451295B0; Wed, 26 Sep 2018 08:48:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A12C2959C for ; Wed, 26 Sep 2018 08:48:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727326AbeIZPAJ (ORCPT ); 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 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba --- 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); } /*