From patchwork Thu Sep 4 03:09:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gui Hecheng X-Patchwork-Id: 4842721 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6C2389F314 for ; Thu, 4 Sep 2014 03:10:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 68F522024F for ; Thu, 4 Sep 2014 03:10:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 531272020E for ; Thu, 4 Sep 2014 03:10:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932081AbaIDDKA (ORCPT ); Wed, 3 Sep 2014 23:10:00 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:8488 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1756133AbaIDDJ7 (ORCPT ); Wed, 3 Sep 2014 23:09:59 -0400 X-IronPort-AV: E=Sophos;i="5.04,462,1406563200"; d="scan'208";a="35493563" Received: from localhost (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 04 Sep 2014 11:07:01 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s8439sFa005332 for ; Thu, 4 Sep 2014 11:09:55 +0800 Received: from localhost.localdomain (10.167.226.111) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Thu, 4 Sep 2014 11:10:06 +0800 From: Gui Hecheng To: CC: Gui Hecheng Subject: [PATCH] btrfs-progs: remove btrfs_release_path before btrfs_free_path Date: Thu, 4 Sep 2014 11:09:23 +0800 Message-ID: <1409800164-14491-1-git-send-email-guihc.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.8.1.4 MIME-Version: 1.0 X-Originating-IP: [10.167.226.111] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The btrfs_free_path calls btrfs_release_path internally. Signed-off-by: Gui Hecheng --- disk-io.c | 1 - file-item.c | 1 - inode-map.c | 2 -- 3 files changed, 4 deletions(-) diff --git a/disk-io.c b/disk-io.c index 9e44f10..0f9f374 100644 --- a/disk-io.c +++ b/disk-io.c @@ -628,7 +628,6 @@ struct btrfs_root *btrfs_read_fs_root_no_cache(struct btrfs_fs_info *fs_info, memcpy(&root->root_key, location, sizeof(*location)); ret = 0; out: - btrfs_release_path(path); btrfs_free_path(path); if (ret) { free(root); diff --git a/file-item.c b/file-item.c index 6f3708b..b46d7f1 100644 --- a/file-item.c +++ b/file-item.c @@ -306,7 +306,6 @@ found: csum_size); btrfs_mark_buffer_dirty(path->nodes[0]); fail: - btrfs_release_path(path); btrfs_free_path(path); return ret; } diff --git a/inode-map.c b/inode-map.c index 3e138b5..1321bfb 100644 --- a/inode-map.c +++ b/inode-map.c @@ -90,12 +90,10 @@ int btrfs_find_free_objectid(struct btrfs_trans_handle *trans, // FIXME -ENOSPC found: root->last_inode_alloc = *objectid; - btrfs_release_path(path); btrfs_free_path(path); BUG_ON(*objectid < search_start); return 0; error: - btrfs_release_path(path); btrfs_free_path(path); return ret; }