From patchwork Thu Sep 6 06:41:14 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: 1412201 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 95D5BDFFCF for ; Thu, 6 Sep 2012 06:41:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753591Ab2IFGlW (ORCPT ); Thu, 6 Sep 2012 02:41:22 -0400 Received: from mail-iy0-f174.google.com ([209.85.210.174]:35099 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388Ab2IFGlT (ORCPT ); Thu, 6 Sep 2012 02:41:19 -0400 Received: by iahk25 with SMTP id k25so1718145iah.19 for ; Wed, 05 Sep 2012 23:41:19 -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=OgaSjFuKdccEZmLXTRT25vbgSV6Yw6Byj6X5CgCiX1M=; b=pfa6Cch+mwaiZg4pLDjjrNmb5zXLRB1LnDs9V0errnYP4etUIBOyKiMa0TpXFIXufA 68L2LvSuffkrSfPP4XEebwjCkQqVsVXq+LJOzdMe3JsrzqVBM6Di3rlU54UgrmpnAXMo IkV8jM7q7xI6tvFJh9292YaXzYLcyY7EgmdDptkPoEp/aUQ2p1eqdveYcDkth9QsiAC7 Tiq1f+gfTdoRFOj3H0Ippr6l+CmbVDLPRo3wzjNtRH58rGjL6tpi9+qNYWyJItKA5c7n spqrkv+ZmEl+e/nVIrSYL/HNwZsqmdcIEqwoJNG2mtFNF8v/T+MwJNSG9FFxF/tyLOjt /C3A== Received: by 10.50.94.135 with SMTP id dc7mr1052436igb.45.1346913678966; Wed, 05 Sep 2012 23:41:18 -0700 (PDT) Received: from [192.168.1.102] ([122.70.1.251]) by mx.google.com with ESMTPS id wg9sm2384433igb.0.2012.09.05.23.41.16 (version=SSLv3 cipher=OTHER); Wed, 05 Sep 2012 23:41:18 -0700 (PDT) Message-ID: <5048458A.1030604@gmail.com> Date: Thu, 06 Sep 2012 14:41:14 +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, linux-kernel@vger.kernel.org Subject: PATCH 3/3] btrfs: set extent-tree.c/add_excluded_extent as void Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org The memory allocation failure will be catched in set_extent_bits. Always return 0 is useless for its callers. Signed-off-by: Wang Sheng-Hui --- fs/btrfs/extent-tree.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 9b9a6fa..3a295ff 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -209,7 +209,7 @@ block_group_cache_tree_search(struct btrfs_fs_info *info, u64 bytenr, return ret; } -static int add_excluded_extent(struct btrfs_root *root, +static void add_excluded_extent(struct btrfs_root *root, u64 start, u64 num_bytes) { u64 end = start + num_bytes - 1; @@ -217,7 +217,6 @@ static int add_excluded_extent(struct btrfs_root *root, start, end, EXTENT_UPTODATE, GFP_NOFS); set_extent_bits(&root->fs_info->freed_extents[1], start, end, EXTENT_UPTODATE, GFP_NOFS); - return 0; } static void free_excluded_extents(struct btrfs_root *root,