From patchwork Wed Sep 5 01:14:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 10588145 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 AFDE714BD for ; Wed, 5 Sep 2018 01:15:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C89C29C4D for ; Wed, 5 Sep 2018 01:15:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D36829C59; Wed, 5 Sep 2018 01:15:06 +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,UNPARSEABLE_RELAY 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 A901D29C4D for ; Wed, 5 Sep 2018 01:15:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725897AbeIEFmn (ORCPT ); Wed, 5 Sep 2018 01:42:43 -0400 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:60350 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725825AbeIEFmn (ORCPT ); Wed, 5 Sep 2018 01:42:43 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01451;MF=bo.liu@linux.alibaba.com;NM=1;PH=DS;RN=1;SR=0;TI=SMTPD_---0T8-yzAj_1536110094; Received: from localhost(mailfrom:bo.liu@linux.alibaba.com fp:SMTPD_---0T8-yzAj_1536110094) by smtp.aliyun-inc.com(127.0.0.1); Wed, 05 Sep 2018 09:14:54 +0800 From: Liu Bo To: Subject: [PATCH] Btrfs: remove redundant btrfs_trans_release_metadata" Date: Wed, 5 Sep 2018 09:14:50 +0800 Message-Id: <1536110090-100798-1-git-send-email-bo.liu@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 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 __btrfs_end_transaction() has done the metadata release twice, probably because it used to process delayed refs in between, but now that we don't process delayed refs any more, the 2nd release is always a noop. Signed-off-by: Liu Bo Reviewed-by: Nikolay Borisov --- fs/btrfs/transaction.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index bb1b9f526e98..94b036a74d11 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -826,12 +826,6 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, return 0; } - btrfs_trans_release_metadata(trans); - trans->block_rsv = NULL; - - if (!list_empty(&trans->new_bgs)) - btrfs_create_pending_block_groups(trans); - trans->delayed_ref_updates = 0; if (!trans->sync) { must_run_delayed_refs =