From patchwork Mon Sep 24 00:47:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Sheng-Hui X-Patchwork-Id: 1496011 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 0E549DFFD0 for ; Mon, 24 Sep 2012 00:47:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754707Ab2IXAr3 (ORCPT ); Sun, 23 Sep 2012 20:47:29 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:54813 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754667Ab2IXAr2 (ORCPT ); Sun, 23 Sep 2012 20:47:28 -0400 Received: by mail-pa0-f46.google.com with SMTP id hz1so591587pad.19 for ; Sun, 23 Sep 2012 17:47:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=gTUdL9X5KNttBNXdskC0FprmGdhStD4aPyW6rNT76yw=; b=JOxpWaTU9QplvZJWLDj1PcJlXEvQCaqeggr3WtR3le0eVu6O4ECJukrXqi2UvPyogs wN0v15oJenY2vvqkrBWaHJkhfEsil9uBzXC7bckBAjI+NQz91uZWl34poAWINwPtIAod M301JEDBe0myjvPowthEZ4n/759pTeeOeRkfecHLkXEyufXKrOkIxq+YWsX6czGs8y6F RClTZE5qLJdD7qPvqfA/aYcdfds42m7JldGrxZUAIwPZFUPfhury1wjkuzfAIrhkq291 9rC3+gJ2HIVqpDXEi84csEAkeVNDYXxTXz57MEGTCTS+wxNlxLtouKxvRK3X+5uUsJLB +axw== Received: by 10.68.234.7 with SMTP id ua7mr32926159pbc.91.1348447648159; Sun, 23 Sep 2012 17:47:28 -0700 (PDT) Received: from [9.115.120.40] ([202.108.130.138]) by mx.google.com with ESMTPS id rr6sm2134324pbc.47.2012.09.23.17.47.25 (version=SSLv3 cipher=OTHER); Sun, 23 Sep 2012 17:47:27 -0700 (PDT) Message-ID: <505FAD9B.7010006@gmail.com> Date: Mon, 24 Sep 2012 08:47:23 +0800 From: Wang Sheng-Hui User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: linux-btrfs@vger.kernel.org, trivial@kernel.org Subject: [PATCH 3/4] Btrfs: remove unnecessary cur_trans set before goto loop in join_transaction Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org In the big loop, cur_trans will be set fs_info->running_transaction before it's used. And after kmem_cache_free it and goto loop, it will be setup again. No need to setup it immediately after freed. Signed-off-by: Wang Sheng-Hui --- fs/btrfs/transaction.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 469a8b6..675d813 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -98,7 +98,6 @@ loop: * to redo the trans_no_join checks above */ kmem_cache_free(btrfs_transaction_cachep, cur_trans); - cur_trans = fs_info->running_transaction; goto loop; } else if (fs_info->fs_state & BTRFS_SUPER_FLAG_ERROR) { spin_unlock(&fs_info->trans_lock);