From patchwork Tue Aug 14 04:54:49 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: 1318111 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 1EC0FDF266 for ; Tue, 14 Aug 2012 04:55:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751950Ab2HNEzD (ORCPT ); Tue, 14 Aug 2012 00:55:03 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:49355 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751684Ab2HNEzB (ORCPT ); Tue, 14 Aug 2012 00:55:01 -0400 Received: by obbuo13 with SMTP id uo13so7964198obb.19 for ; Mon, 13 Aug 2012 21:55:00 -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=s3HvFa0A4DMHeZc1ZwCD3zQsAGcUhMWWChI94TWq6AE=; b=Tj2tJJjf5znXbqBjT0mPpf7PaHfsFpUFHwHPhcnjpMmRHnAQgOxn7xZ0HxF4r1ZKh8 o5K43QvUPw80tcBFLNEQdbfYl0J2tgFIyJHvgDrcWMXZ38hp7Y+82Q3PnAd9xI/DRZPV CVukyKc2P8s0qocIJnt6q/IUKiPvxOmCrVxpQvIe+7UkKUBzsbQZ3zRTJWRXATrurdeH K0SQyW6yCnvWjWz2dHAFaVdnaxl+UBtYD9oGQSF4ooLmhql2AbZIZnGtDYiyUZmSnCzv 0UjoosaEjcp0aXziEy8jyowqFesYAmWBtqu6cVdC+FObmapuVoUF5SoE5Myv11QL/pEk dHdA== Received: by 10.182.14.101 with SMTP id o5mr16406581obc.1.1344920100382; Mon, 13 Aug 2012 21:55:00 -0700 (PDT) Received: from [9.115.120.146] ([202.108.130.138]) by mx.google.com with ESMTPS id ql3sm1703094obc.17.2012.08.13.21.54.57 (version=SSLv3 cipher=OTHER); Mon, 13 Aug 2012 21:54:59 -0700 (PDT) Message-ID: <5029DA19.4060401@gmail.com> Date: Tue, 14 Aug 2012 12:54:49 +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 , 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(-) 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; }