From patchwork Thu Apr 11 07:08:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Shilong X-Patchwork-Id: 2426721 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 EA4CEDF230 for ; Thu, 11 Apr 2013 07:04:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753419Ab3DKHEp (ORCPT ); Thu, 11 Apr 2013 03:04:45 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:2437 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751514Ab3DKHEo (ORCPT ); Thu, 11 Apr 2013 03:04:44 -0400 X-IronPort-AV: E=Sophos;i="4.87,454,1363104000"; d="scan'208";a="7034307" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 11 Apr 2013 15:02:05 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id r3B74g1u023723; Thu, 11 Apr 2013 15:04:42 +0800 Received: from [127.0.0.1] ([10.167.233.203]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013041115033048-469974 ; Thu, 11 Apr 2013 15:03:30 +0800 Message-ID: <51666187.2010602@cn.fujitsu.com> Date: Thu, 11 Apr 2013 15:08:55 +0800 From: Wang Shilong User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: linux-btrfs@vger.kernel.org CC: Jan Schmidt Subject: [PATCH V2 2/2] Btrfs: make __merge_refs() return type be void X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/04/11 15:03:30, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/04/11 15:03:30, Serialize complete at 2013/04/11 15:03:30 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org __merge_refs() always return 0, it is unnecessary for the caller to check the return value. Signed-off-by: Wang Shilong --- Changelog v1->v2: - don't make __add_missing_keys() return type to be void so that makes people aware of unhandled BUG_ON() from read_tree block(). - rename title to be more accurate --- fs/btrfs/backref.c | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index dc200f6..13720d4 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -443,7 +443,7 @@ static int __add_missing_keys(struct btrfs_fs_info *fs_info, * having a parent). * mode = 2: merge identical parents */ -static int __merge_refs(struct list_head *head, int mode) +static void __merge_refs(struct list_head *head, int mode) { struct list_head *pos1; @@ -489,7 +489,6 @@ static int __merge_refs(struct list_head *head, int mode) } } - return 0; } /* @@ -884,18 +883,14 @@ again: if (ret) goto out; - ret = __merge_refs(&prefs, 1); - if (ret) - goto out; + __merge_refs(&prefs, 1); ret = __resolve_indirect_refs(fs_info, search_commit_root, time_seq, &prefs, extent_item_pos); if (ret) goto out; - ret = __merge_refs(&prefs, 2); - if (ret) - goto out; + __merge_refs(&prefs, 2); while (!list_empty(&prefs)) { ref = list_first_entry(&prefs, struct __prelim_ref, list);