Commit c3302931 authored by OGAWA Hirofumi's avatar OGAWA Hirofumi Committed by Linus Torvalds

fat: i_blocks warning fix

blkcnt_t type depends on CONFIG_LSF. Use unsigned long long always for
printk().  But lazy to type it, so add "llu" and use it.
Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9ca59f4c
...@@ -86,7 +86,7 @@ static int fat__get_entry(struct inode *dir, loff_t *pos, ...@@ -86,7 +86,7 @@ static int fat__get_entry(struct inode *dir, loff_t *pos,
*bh = sb_bread(sb, phys); *bh = sb_bread(sb, phys);
if (*bh == NULL) { if (*bh == NULL) {
printk(KERN_ERR "FAT: Directory bread(block %llu) failed\n", printk(KERN_ERR "FAT: Directory bread(block %llu) failed\n",
(unsigned long long)phys); (llu)phys);
/* skip this block */ /* skip this block */
*pos = (iblock + 1) << sb->s_blocksize_bits; *pos = (iblock + 1) << sb->s_blocksize_bits;
goto next; goto next;
......
...@@ -323,4 +323,7 @@ extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs); ...@@ -323,4 +323,7 @@ extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs);
int fat_cache_init(void); int fat_cache_init(void);
void fat_cache_destroy(void); void fat_cache_destroy(void);
/* helper for printk */
typedef unsigned long long llu;
#endif /* !_FAT_H */ #endif /* !_FAT_H */
...@@ -93,8 +93,7 @@ static int fat12_ent_bread(struct super_block *sb, struct fat_entry *fatent, ...@@ -93,8 +93,7 @@ static int fat12_ent_bread(struct super_block *sb, struct fat_entry *fatent,
err_brelse: err_brelse:
brelse(bhs[0]); brelse(bhs[0]);
err: err:
printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", (llu)blocknr);
(unsigned long long)blocknr);
return -EIO; return -EIO;
} }
...@@ -107,7 +106,7 @@ static int fat_ent_bread(struct super_block *sb, struct fat_entry *fatent, ...@@ -107,7 +106,7 @@ static int fat_ent_bread(struct super_block *sb, struct fat_entry *fatent,
fatent->bhs[0] = sb_bread(sb, blocknr); fatent->bhs[0] = sb_bread(sb, blocknr);
if (!fatent->bhs[0]) { if (!fatent->bhs[0]) {
printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n",
(unsigned long long)blocknr); (llu)blocknr);
return -EIO; return -EIO;
} }
fatent->nr_bhs = 1; fatent->nr_bhs = 1;
......
...@@ -124,8 +124,9 @@ int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster) ...@@ -124,8 +124,9 @@ int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster)
mark_inode_dirty(inode); mark_inode_dirty(inode);
} }
if (new_fclus != (inode->i_blocks >> (sbi->cluster_bits - 9))) { if (new_fclus != (inode->i_blocks >> (sbi->cluster_bits - 9))) {
fat_fs_panic(sb, "clusters badly computed (%d != %lu)", fat_fs_panic(sb, "clusters badly computed (%d != %llu)",
new_fclus, inode->i_blocks >> (sbi->cluster_bits - 9)); new_fclus,
(llu)(inode->i_blocks >> (sbi->cluster_bits - 9)));
fat_cache_inval_inode(inode); fat_cache_inval_inode(inode);
} }
inode->i_blocks += nr_cluster << (sbi->cluster_bits - 9); inode->i_blocks += nr_cluster << (sbi->cluster_bits - 9);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment