From patchwork Mon Sep 24 00:47:10 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: 1496001 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 02D2ADFFD0 for ; Mon, 24 Sep 2012 00:47:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754704Ab2IXArT (ORCPT ); Sun, 23 Sep 2012 20:47:19 -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 S1754667Ab2IXArP (ORCPT ); Sun, 23 Sep 2012 20:47:15 -0400 Received: by padhz1 with SMTP id hz1so591587pad.19 for ; Sun, 23 Sep 2012 17:47:15 -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=ltk8hLG5F2J/m+1u0iZU/A/YBUIowGYy4YKoJwGV+qg=; b=T4s1EqP6TlQKU0/o1BxmJt6zA1/cWEnzb5rxCi/5rOykMqgc56KrF1jic0j+igpF9/ QcXaEqzitZlqEH4dxpUd9TQRbdWuUsu1xmDq+KigtbXi/KLkuRzEdAlcGYFUhk/Hx2JT lffKwauTpaWbjArp8bIm1vwAT765p+N2CUJglVPrkM9BWFlPgGmHg73ypo6hcgkQhwZb /S64v9ftCrYw9oOY1gi5+h4wSUWXdoPFviCpjiJ9MLr3A3C7rNewzjAhICOQOd9A+gJz mFLC4egO/h2txDDIGi1PKYg3kxUPEQDsAof5ebPb9u/hr9l3GnF/La11IusreH/vKchr 4suQ== Received: by 10.66.79.38 with SMTP id g6mr28656892pax.40.1348447635404; Sun, 23 Sep 2012 17:47:15 -0700 (PDT) Received: from [9.115.120.40] ([202.108.130.138]) by mx.google.com with ESMTPS id f9sm7826373paz.1.2012.09.23.17.47.12 (version=SSLv3 cipher=OTHER); Sun, 23 Sep 2012 17:47:14 -0700 (PDT) Message-ID: <505FAD8E.2070506@gmail.com> Date: Mon, 24 Sep 2012 08:47:10 +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 2/4] Btrfs: trivial cleanup: setup ret with 0 directly in btrfs_wait_for_commit Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org trivial code cleanup. Signed-off-by: Wang Sheng-Hui --- fs/btrfs/transaction.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 8fcc501..469a8b6 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -420,9 +420,8 @@ static noinline void wait_for_commit(struct btrfs_root *root, int btrfs_wait_for_commit(struct btrfs_root *root, u64 transid) { struct btrfs_transaction *cur_trans = NULL, *t; - int ret; + int ret = 0; - ret = 0; if (transid) { if (transid <= root->fs_info->last_trans_committed) goto out;