X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=fs%2Ffat%2Ffile.c;h=3b48219aefbef5e53cf157b0494e2e256964d4c0;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=00cb5d720744f51cf7f843dfd4aa474dbca8f46a;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/fs/fat/file.c b/fs/fat/file.c index 00cb5d720..3b48219ae 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c @@ -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))) { @@ -89,12 +90,6 @@ void fat_truncate(struct inode *inode) const unsigned int cluster_size = sbi->cluster_size; int nr_clusters; - /* Why no return value? Surely the disk could fail... */ - if (IS_RDONLY (inode)) - return /* -EPERM */; - if (IS_IMMUTABLE(inode)) - return /* -EPERM */; - /* * This protects against truncating a file bigger than it was then * trying to write into the hole.