Re: [PATCH] btrfs: Correct printing of sector_t

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Li Zefan
Date: Tuesday, November 30, 2010 - 6:33 pm

Geert Uytterhoeven wrote:

While we are at this..

===================

[PATCH] btrfs: Fix compile warning when CONFIG_MIGRATION is not set

Fix this newly introduced warning:

fs/btrfs/disk-io.c:699: warning: 'btree_migratepage' defined but not used

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 fs/btrfs/disk-io.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 33b6d45..7648247 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -696,6 +696,7 @@ static int btree_submit_bio_hook(struct inode *inode, int rw, struct bio *bio,
 				   __btree_submit_bio_done);
 }
 
+#ifdef CONFIG_MIGRATION
 static int btree_migratepage(struct address_space *mapping,
 			struct page *newpage, struct page *page)
 {
@@ -712,12 +713,10 @@ static int btree_migratepage(struct address_space *mapping,
 	if (page_has_private(page) &&
 	    !try_to_release_page(page, GFP_KERNEL))
 		return -EAGAIN;
-#ifdef CONFIG_MIGRATION
+
 	return migrate_page(mapping, newpage, page);
-#else
-	return -ENOSYS;
-#endif
 }
+#endif
 
 static int btree_writepage(struct page *page, struct writeback_control *wbc)
 {
-- 
1.6.3

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] btrfs: Correct printing of sector_t, Geert Uytterhoeven, (Tue Nov 30, 1:30 pm)
Re: [PATCH] btrfs: Correct printing of sector_t, Randy Dunlap, (Tue Nov 30, 1:33 pm)
Re: [PATCH] btrfs: Correct printing of sector_t, Li Zefan, (Tue Nov 30, 6:33 pm)