diff options
author | Andries E. Brouwer <andries.brouwer@cwi.nl> | 2004-07-02 06:42:48 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-02 06:42:48 -0700 |
commit | fd44b2f9391beaefe71023704f78447db667c19b (patch) | |
tree | 7e8e7b07fb2f65331661df95987a6c4076464b05 /fs | |
parent | 93b3d54597be9948e6d6c9939471dda7c510094f (diff) | |
download | history-fd44b2f9391beaefe71023704f78447db667c19b.tar.gz |
[PATCH] fat/inode.c
Two years ago, OGAWA Hirofumi removed some ugly code and
added a few simple tests to the FAT filesystem code,
intended to avoid recognizing non-FAT as FAT (for people who
fail to specify rootfstype=, forcing the kernel to guess).
That worked fairly well, until this year.
I have now seen a thread in Czech and a report from Holland that
involved the "FAT: bogus sectors-per-track value" error message.
The patch below removes this test again. The advantage is that
some real-life FAT filesystems can be mounted again.
The disadvantage that more non-FAT fss will be accepted as FAT.
Ferry van Steen <freaky@bananateam.nl> reports "the patch Andries
Brouwer gave me seems to work".
Signed-off-by: Andries Brouwer <aeb@cwi.nl>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fat/inode.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 2e915be30c4cdd..c0fc6b7d6a9874 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -843,18 +843,12 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, brelse(bh); goto out_invalid; } - if (!b->secs_track) { - if (!silent) - printk(KERN_ERR "FAT: bogus sectors-per-track value\n"); - brelse(bh); - goto out_invalid; - } - if (!b->heads) { - if (!silent) - printk(KERN_ERR "FAT: bogus number-of-heads value\n"); - brelse(bh); - goto out_invalid; - } + + /* + * Earlier we checked here that b->secs_track and b->head are nonzero, + * but it turns out valid FAT filesystems can have zero there. + */ + media = b->media; if (!FAT_VALID_MEDIA(media)) { if (!silent) |