]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] uses ->i_pos instead of ->i_ino on fat_fs_panic()
authorHirofumi Ogawa <hirofumi@mail.parknet.co.jp>
Sat, 2 Aug 2003 11:08:55 +0000 (04:08 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Sat, 2 Aug 2003 11:08:55 +0000 (04:08 -0700)
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(-)

fs/fat/cache.c
fs/fat/inode.c
fs/fat/misc.c

index 9884189dece76846fbec0d31b75c5b0a4c87ad8b..eec09901e22582bd216ad7f0b1ab8ae9a078153f 100644 (file)
@@ -258,8 +258,8 @@ void fat_cache_add(struct inode *inode, int f_clu, int d_clu)
                if (walk->start_cluster == first &&
                    walk->file_cluster == f_clu) {
                        if (walk->disk_cluster != d_clu) {
-                               printk(KERN_ERR "FAT: cache corruption"
-                                      " (ino %lu)\n", inode->i_ino);
+                               printk(KERN_ERR "FAT: cache corruption "
+                                      "(i_pos %lld)\n", MSDOS_I(inode)->i_pos);
                                __fat_cache_inval_inode(inode);
                                goto out;
                        }
@@ -307,7 +307,7 @@ int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus)
                /* prevent the infinite loop of cluster chain */
                if (*fclus > limit) {
                        fat_fs_panic(sb, "%s: detected the cluster chain loop"
-                                    " (i_pos %llu)", __FUNCTION__,
+                                    " (i_pos %lld)", __FUNCTION__,
                                     MSDOS_I(inode)->i_pos);
                        return -EIO;
                }
@@ -317,7 +317,7 @@ int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus)
                        return nr;
                else if (nr == FAT_ENT_FREE) {
                        fat_fs_panic(sb, "%s: invalid cluster chain"
-                                    " (i_pos %llu)", __FUNCTION__,
+                                    " (i_pos %lld)", __FUNCTION__,
                                     MSDOS_I(inode)->i_pos);
                        return -EIO;
                } else if (nr == FAT_ENT_EOF) {
@@ -343,7 +343,7 @@ static int fat_bmap_cluster(struct inode *inode, int cluster)
        if (ret < 0)
                return ret;
        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);
                return -EIO;
        }
@@ -427,8 +427,8 @@ int fat_free(struct inode *inode, int skip)
                if (nr < 0)
                        goto error;
                else if (nr == FAT_ENT_FREE) {
-                       fat_fs_panic(sb, "%s: deleting beyond EOF (ino %lu)",
-                                    __FUNCTION__, inode->i_ino);
+                       fat_fs_panic(sb, "%s: deleting beyond EOF (i_pos %lld)",
+                                    __FUNCTION__, MSDOS_I(inode)->i_pos);
                        nr = -EIO;
                        goto error;
                }
index 4d23eafeca3d2cda638ab8109efc201099fe683c..f214dc6b611899c856daa661ac49704dfd4d2c1a 100644 (file)
@@ -1172,7 +1172,7 @@ retry:
        }
        lock_kernel();
        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);
                unlock_kernel();
                return;
index d4c56f74c762b6943ef03c76c9f185a37a579392..6406f202bbb7282f736572c56fe156e8c53101d2 100644 (file)
@@ -150,7 +150,7 @@ int fat_add_cluster(struct inode *inode)
                mark_inode_dirty(inode);
        }
        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));
                fat_cache_inval_inode(inode);
        }