From patchwork Tue Aug 14 04:57:54 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: 1318121 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 63716DF266 for ; Tue, 14 Aug 2012 04:58:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752080Ab2HNE6A (ORCPT ); Tue, 14 Aug 2012 00:58:00 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:64893 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751684Ab2HNE57 (ORCPT ); Tue, 14 Aug 2012 00:57:59 -0400 Received: by mail-ob0-f174.google.com with SMTP id uo13so7967018obb.19 for ; Mon, 13 Aug 2012 21:57:59 -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=iCMk6K7BLVJd7Z//mL3CyZfPau45JnfMNiOoVNDeRU0=; b=S5rEftoaGWbcGFFqC3MZuiwt+M2lGA/uErZOd7H6ZcVz4t9Qzo9RQWL5vNuaHIM0TH yn+oWt3xgPjf+QJsQ92V/U8JvBJbrC7AD4EXRRnL/oVde6gSH1C3N4Mv94AaL5ly1gPM dQRQPwyremObeB8kBVty+86CGrfDADhL3TGAk3pMibwvpFdBhozt5EqKDyGI/kSl2zkZ 5097tFlW1ciZjAvLj4c13LQPKCRYfLvYK056t0VoGRlBZl5w+WzD1Bz9vKdS/pPARQg2 Uz8vPDyMFeYFbBLX+5dI1Hwq3xR8EeDKqnoD8GMR0EQYLsU68Xkh0HoRM6oKicg8YCnB LhIg== Received: by 10.182.212.36 with SMTP id nh4mr16147161obc.37.1344920279276; Mon, 13 Aug 2012 21:57:59 -0700 (PDT) Received: from [9.115.120.146] ([202.108.130.138]) by mx.google.com with ESMTPS id l10sm1376761oeb.13.2012.08.13.21.57.56 (version=SSLv3 cipher=OTHER); Mon, 13 Aug 2012 21:57:58 -0700 (PDT) Message-ID: <5029DAD2.4020805@gmail.com> Date: Tue, 14 Aug 2012 12:57:54 +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: chris.mason@fusionio.com, linux-btrfs@vger.kernel.org Subject: [PATCH] btrfs-progs: remove redundant value set to path->reada in ctree.c/btrfs_alloc_path Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org btrfs_init_path has init the path to 0s. No need to set ->reada 0 after path init. Signed-off-by: Wang Sheng-Hui --- ctree.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/ctree.c b/ctree.c index 2d86b1e..a04e0da 100644 --- a/ctree.c +++ b/ctree.c @@ -43,10 +43,9 @@ struct btrfs_path *btrfs_alloc_path(void) { struct btrfs_path *path; path = kmalloc(sizeof(struct btrfs_path), GFP_NOFS); - if (path) { + if (path) btrfs_init_path(path); - path->reada = 0; - } + return path; }