fs/fat: Use correct logical sector size for Atari GEMDOS FAT
Fix erroneous use of device blocksize instead of logical sector size in
Atari GEMDOS FAT code (GEMDOS uses a 16 bit FAT and a constant 2 logical
sectors per cluster, and modifies the logical sector size to cope with the
limits imposed by the 16 bit FAT). The bug was probably introduced by me when
porting this code forward from 2.4.
With this fix, I can successfully mount GEMDOS partitons up to 256 MB in size
as prepared by Petr Stehlik. 512 MB requires 8k sector size, sorry.
Signed-off-by: Michael Schmitz <firstname.lastname@example.org>
Signed-off-by: Geert Uytterhoeven <email@example.com>
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index a92db5a..4a3d58f 100644
@@ -1481,7 +1481,7 @@
* it's a real MSDOS partition with 12-bit fat.
if (sbi->fat_bits != 32 && total_clusters+2 > sbi->
sbi->fat_bits = 12;
/* if it's a floppy disk --> 12bit fat */
if (sbi->fat_bits != 32 && MAJOR(sb->s_dev) == FLOPPY_MAJOR)