Skip to content

Commit

Permalink
Btrfs: fix compiler warnings
Browse files Browse the repository at this point in the history
... regarding an unused function when !MIGRATION, and regarding a
printk() format string vs argument mismatch.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Jan Beulich authored and Chris Mason committed Dec 10, 2010
1 parent fdfb1e4 commit 3dd1462
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -712,12 +713,9 @@ 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)
{
Expand Down
6 changes: 3 additions & 3 deletions fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -5712,9 +5712,9 @@ static void btrfs_end_dio_bio(struct bio *bio, int err)

if (err) {
printk(KERN_ERR "btrfs direct IO failed ino %lu rw %lu "
"disk_bytenr %lu len %u err no %d\n",
dip->inode->i_ino, bio->bi_rw, bio->bi_sector,
bio->bi_size, err);
"sector %#Lx len %u err no %d\n",
dip->inode->i_ino, bio->bi_rw,
(unsigned long long)bio->bi_sector, bio->bi_size, err);
dip->errors = 1;

/*
Expand Down

0 comments on commit 3dd1462

Please sign in to comment.