Commit 3f4cb87c authored by Hirofumi Ogawa's avatar Hirofumi Ogawa Committed by Linus Torvalds

[PATCH] uses ->i_pos instead of ->i_ino on fat_fs_panic()

This uses ->i_pos instead of ->i_ino on fat_fs_panic() because ->i_ino
is not useful.

loff_t is _signed_ long long, so format string should use "%lld".


 fs/fat/cache.c |   14 +++++++-------
 fs/fat/inode.c |    2 +-
 fs/fat/misc.c  |    2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)
parent b17b8141
...@@ -258,8 +258,8 @@ void fat_cache_add(struct inode *inode, int f_clu, int d_clu) ...@@ -258,8 +258,8 @@ void fat_cache_add(struct inode *inode, int f_clu, int d_clu)
if (walk->start_cluster == first && if (walk->start_cluster == first &&
walk->file_cluster == f_clu) { walk->file_cluster == f_clu) {
if (walk->disk_cluster != d_clu) { if (walk->disk_cluster != d_clu) {
printk(KERN_ERR "FAT: cache corruption" printk(KERN_ERR "FAT: cache corruption "
" (ino %lu)\n", inode->i_ino); "(i_pos %lld)\n", MSDOS_I(inode)->i_pos);
__fat_cache_inval_inode(inode); __fat_cache_inval_inode(inode);
goto out; goto out;
} }
...@@ -307,7 +307,7 @@ int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus) ...@@ -307,7 +307,7 @@ int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus)
/* prevent the infinite loop of cluster chain */ /* prevent the infinite loop of cluster chain */
if (*fclus > limit) { if (*fclus > limit) {
fat_fs_panic(sb, "%s: detected the cluster chain loop" fat_fs_panic(sb, "%s: detected the cluster chain loop"
" (i_pos %llu)", __FUNCTION__, " (i_pos %lld)", __FUNCTION__,
MSDOS_I(inode)->i_pos); MSDOS_I(inode)->i_pos);
return -EIO; return -EIO;
} }
...@@ -317,7 +317,7 @@ int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus) ...@@ -317,7 +317,7 @@ int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus)
return nr; return nr;
else if (nr == FAT_ENT_FREE) { else if (nr == FAT_ENT_FREE) {
fat_fs_panic(sb, "%s: invalid cluster chain" fat_fs_panic(sb, "%s: invalid cluster chain"
" (i_pos %llu)", __FUNCTION__, " (i_pos %lld)", __FUNCTION__,
MSDOS_I(inode)->i_pos); MSDOS_I(inode)->i_pos);
return -EIO; return -EIO;
} else if (nr == FAT_ENT_EOF) { } else if (nr == FAT_ENT_EOF) {
...@@ -343,7 +343,7 @@ static int fat_bmap_cluster(struct inode *inode, int cluster) ...@@ -343,7 +343,7 @@ static int fat_bmap_cluster(struct inode *inode, int cluster)
if (ret < 0) if (ret < 0)
return ret; return ret;
else if (ret == FAT_ENT_EOF) { else if (ret == FAT_ENT_EOF) {
fat_fs_panic(sb, "%s: request beyond EOF (i_pos %llu)", fat_fs_panic(sb, "%s: request beyond EOF (i_pos %lld)",
__FUNCTION__, MSDOS_I(inode)->i_pos); __FUNCTION__, MSDOS_I(inode)->i_pos);
return -EIO; return -EIO;
} }
...@@ -427,8 +427,8 @@ int fat_free(struct inode *inode, int skip) ...@@ -427,8 +427,8 @@ int fat_free(struct inode *inode, int skip)
if (nr < 0) if (nr < 0)
goto error; goto error;
else if (nr == FAT_ENT_FREE) { else if (nr == FAT_ENT_FREE) {
fat_fs_panic(sb, "%s: deleting beyond EOF (ino %lu)", fat_fs_panic(sb, "%s: deleting beyond EOF (i_pos %lld)",
__FUNCTION__, inode->i_ino); __FUNCTION__, MSDOS_I(inode)->i_pos);
nr = -EIO; nr = -EIO;
goto error; goto error;
} }
......
...@@ -1172,7 +1172,7 @@ void fat_write_inode(struct inode *inode, int wait) ...@@ -1172,7 +1172,7 @@ void fat_write_inode(struct inode *inode, int wait)
} }
lock_kernel(); lock_kernel();
if (!(bh = sb_bread(sb, i_pos >> MSDOS_SB(sb)->dir_per_block_bits))) { if (!(bh = sb_bread(sb, i_pos >> MSDOS_SB(sb)->dir_per_block_bits))) {
fat_fs_panic(sb, "unable to read i-node block (i_pos %llu)", fat_fs_panic(sb, "unable to read i-node block (i_pos %lld)",
i_pos); i_pos);
unlock_kernel(); unlock_kernel();
return; return;
......
...@@ -150,7 +150,7 @@ int fat_add_cluster(struct inode *inode) ...@@ -150,7 +150,7 @@ int fat_add_cluster(struct inode *inode)
mark_inode_dirty(inode); mark_inode_dirty(inode);
} }
if (new_fclus != (inode->i_blocks >> (cluster_bits - 9))) { if (new_fclus != (inode->i_blocks >> (cluster_bits - 9))) {
fat_fs_panic(sb, "clusters badly computed (%d != %ld)", fat_fs_panic(sb, "clusters badly computed (%d != %lu)",
new_fclus, inode->i_blocks >> (cluster_bits - 9)); new_fclus, inode->i_blocks >> (cluster_bits - 9));
fat_cache_inval_inode(inode); fat_cache_inval_inode(inode);
} }
......
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