linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wanlong Gao <wanlong.gao@gmail.com>
To: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: chris.mason@oracle.com, Wanlong Gao <gaowanlong@cn.fujitsu.com>
Subject: [PATCH] btrfs:make close_ctree() return void
Date: Mon, 22 Aug 2011 23:18:11 +0800	[thread overview]
Message-ID: <1314026291-8873-1-git-send-email-wanlong.gao@gmail.com> (raw)

From: Wanlong Gao <gaowanlong@cn.fujitsu.com>

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 <gaowanlong@cn.fujitsu.com>
---
 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 {
-- 
1.7.4.1

             reply	other threads:[~2011-08-22 15:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-22 15:18 Wanlong Gao [this message]
2011-08-23  1:00 ` [PATCH] btrfs:make close_ctree() return void Li Zefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1314026291-8873-1-git-send-email-wanlong.gao@gmail.com \
    --to=wanlong.gao@gmail.com \
    --cc=chris.mason@oracle.com \
    --cc=gaowanlong@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).