[PATCH] btrfs: Correct printing of sector_t

From: Geert Uytterhoeven
Date: Tue Nov 30 2010 - 15:30:19 EST


If CONFIG_LBDAF=y, `sector_t' becomes `u64' instead of `unsigned long':

fs/btrfs/inode.c: In function ʽbtrfs_end_dio_bioʼ:
fs/btrfs/inode.c:5717: warning: format ʽ%luʼ expects type ʽlong unsigned intʼ, but argument 4 has type ʽsector_tʼ

Hence always cast it to `unsigned long long' for printing.

Introduced by commit e65e1535542931e51189832264cd282e5899e4b9 ("btrfs: fix
panic caused by direct IO")

Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
---
fs/btrfs/inode.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 8039390..fbffe5f 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -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);
+ "disk_bytenr %llu 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;

/*
--
1.7.0.4

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/