From patchwork Thu Jul 14 21:23:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Fasheh X-Patchwork-Id: 975822 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6ELOB0U030366 for ; Thu, 14 Jul 2011 21:24:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754865Ab1GNVXI (ORCPT ); Thu, 14 Jul 2011 17:23:08 -0400 Received: from cantor2.suse.de ([195.135.220.15]:51843 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754613Ab1GNVXH (ORCPT ); Thu, 14 Jul 2011 17:23:07 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id C8E5C8B013; Thu, 14 Jul 2011 23:23:06 +0200 (CEST) Date: Thu, 14 Jul 2011 14:23:06 -0700 From: Mark Fasheh To: linux-btrfs@vger.kernel.org Cc: chris.mason@oracle.com Subject: [PATCH] btrfs: make btrfs_set_root_node void Message-ID: <20110714212306.GE10500@wotan.suse.de> Reply-To: Mark Fasheh Mime-Version: 1.0 Content-Disposition: inline Organization: SUSE Labs, Novell, Inc User-Agent: Mutt/1.5.9i Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 14 Jul 2011 21:24:12 +0000 (UTC) This is fairly trivial - btrfs_set_root_node() - always returns zero so we can just make it void. All callers ignore the return code now anyway. I also made sure to check that none of the functions that btrfs_set_root_node() calls returns an error that we might have needed to catch and pass back. Signed-off-by: Mark Fasheh --- fs/btrfs/ctree.h | 4 ++-- fs/btrfs/root-tree.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 3b859a3..20bd05f 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2404,8 +2404,8 @@ int btrfs_find_last_root(struct btrfs_root *root, u64 objectid, struct btrfs_root_item *item, struct btrfs_key *key); int btrfs_find_dead_roots(struct btrfs_root *root, u64 objectid); int btrfs_find_orphan_roots(struct btrfs_root *tree_root); -int btrfs_set_root_node(struct btrfs_root_item *item, - struct extent_buffer *node); +void btrfs_set_root_node(struct btrfs_root_item *item, + struct extent_buffer *node); void btrfs_check_and_init_root_item(struct btrfs_root_item *item); /* dir-item.c */ diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c index ea96ab8..d411cb4 100644 --- a/fs/btrfs/root-tree.c +++ b/fs/btrfs/root-tree.c @@ -71,13 +71,12 @@ out: return ret; } -int btrfs_set_root_node(struct btrfs_root_item *item, - struct extent_buffer *node) +void btrfs_set_root_node(struct btrfs_root_item *item, + struct extent_buffer *node) { btrfs_set_root_bytenr(item, node->start); btrfs_set_root_level(item, btrfs_header_level(node)); btrfs_set_root_generation(item, btrfs_header_generation(node)); - return 0; } /*