Commit 70c6e41e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] FAT: small fixes

From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

- use fat_fs_panic() instead of BUG() if it read a corrupted inode.

- add missing "\n".
parent e7b1438a
......@@ -47,7 +47,8 @@ int fat_get_block(struct inode *inode, sector_t iblock,
if (!create)
return 0;
if (iblock != MSDOS_I(inode)->mmu_private >> sb->s_blocksize_bits) {
BUG();
fat_fs_panic(sb, "corrupted file size (i_pos %lld, %lld)",
MSDOS_I(inode)->i_pos, MSDOS_I(inode)->mmu_private);
return -EIO;
}
if (!((unsigned long)iblock & (MSDOS_SB(sb)->sec_per_clus - 1))) {
......
......@@ -1245,7 +1245,7 @@ void fat_write_inode(struct inode *inode, int wait)
lock_kernel();
if (!(bh = sb_bread(sb, i_pos >> MSDOS_SB(sb)->dir_per_block_bits))) {
printk(KERN_ERR "FAT: unable to read inode block "
"for updating (i_pos %lld)", i_pos);
"for updating (i_pos %lld)\n", i_pos);
unlock_kernel();
return /* -EIO */;
}
......
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