From patchwork Mon Aug 22 15:18:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wanlong Gao X-Patchwork-Id: 1085772 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7MFL4VE030838 for ; Mon, 22 Aug 2011 15:21:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752821Ab1HVPUV (ORCPT ); Mon, 22 Aug 2011 11:20:21 -0400 Received: from mail-yi0-f46.google.com ([209.85.218.46]:63610 "EHLO mail-yi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752754Ab1HVPUT (ORCPT ); Mon, 22 Aug 2011 11:20:19 -0400 Received: by yie30 with SMTP id 30so3640807yie.19 for ; Mon, 22 Aug 2011 08:20:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=38MbNwlKDaeKDF0c1qZIfj1zAI6/0mtzPniH2dfBQbA=; b=D3LgYkXvLYm7Cb5br8X5u+lWv/L4quSfmVqhvNCa9ekZg2KI0Kribe+JVbck163Gct byrKnTf7tKEEh6V07Ltfxz4Z4cclwlacnJMl3GdcWAQ9pE33OLCLmSjb+a6MB4oW4Mcz upFVXGUFP9zegpXdMWuZ8MPl96dbYeOvBdjUE= Received: by 10.142.177.13 with SMTP id z13mr1580396wfe.2.1314026419018; Mon, 22 Aug 2011 08:20:19 -0700 (PDT) Received: from localhost.localdomain ([58.240.69.74]) by mx.google.com with ESMTPS id v4sm2535713wfv.18.2011.08.22.08.20.16 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Aug 2011 08:20:18 -0700 (PDT) From: Wanlong Gao To: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Cc: chris.mason@oracle.com, Wanlong Gao Subject: [PATCH] btrfs:make close_ctree() return void Date: Mon, 22 Aug 2011 23:18:11 +0800 Message-Id: <1314026291-8873-1-git-send-email-wanlong.gao@gmail.com> X-Mailer: git-send-email 1.7.4.1 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 (demeter1.kernel.org [140.211.167.41]); Mon, 22 Aug 2011 15:21:04 +0000 (UTC) From: Wanlong Gao Make close_ctree() return void since it always return 0, and fix the return value of btrfs_put_super() to consistent with VFS. Signed-off-by: Wanlong Gao --- fs/btrfs/disk-io.c | 4 +--- fs/btrfs/disk-io.h | 2 +- fs/btrfs/super.c | 5 +---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 07b3ac6..b2c15d4 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2528,7 +2528,7 @@ int btrfs_commit_super(struct btrfs_root *root) return ret; } -int close_ctree(struct btrfs_root *root) +void close_ctree(struct btrfs_root *root) { struct btrfs_fs_info *fs_info = root->fs_info; int ret; @@ -2630,8 +2630,6 @@ int close_ctree(struct btrfs_root *root) kfree(fs_info->dev_root); kfree(fs_info->csum_root); kfree(fs_info); - - return 0; } int btrfs_buffer_uptodate(struct extent_buffer *buf, u64 parent_transid) diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h index bec3ea4..4a191b2 100644 --- a/fs/btrfs/disk-io.h +++ b/fs/btrfs/disk-io.h @@ -47,7 +47,7 @@ int clean_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_devices, char *options); -int close_ctree(struct btrfs_root *root); +void close_ctree(struct btrfs_root *root); int write_ctree_super(struct btrfs_trans_handle *trans, struct btrfs_root *root, int max_mirrors); struct buffer_head *btrfs_read_dev_super(struct block_device *bdev); diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 31e9654..e1d8d32 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -146,12 +146,9 @@ void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function, static void btrfs_put_super(struct super_block *sb) { struct btrfs_root *root = btrfs_sb(sb); - int ret; - ret = close_ctree(root); + close_ctree(root); sb->s_fs_info = NULL; - - (void)ret; /* FIXME: need to fix VFS to return error? */ } enum {