From: Alan Cox Date: Sat, 17 Feb 2007 01:40:20 +0000 (+0100) Subject: ide-floppy: Fix unformatted media crash X-Git-Tag: v2.6.21-rc1~78^2~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdb77da4ca68ae17a39d58c9d5c00479a7e124c0;p=pandora-kernel.git ide-floppy: Fix unformatted media crash A ZIP or similar with unformatted media will cause crashes when attempts are made to read/write it in some cases. This is because bs_factor is zero and we divide by it causing an oops. As the size of a non-accessible/non-existant media is really a bit of a zen question it doesn't matter if non-existant media is 512 bytes per sector or zero. Setting it to 1 causes us to generate 512 bytes/sector accesses and error properly. Based on a fix found lurking in an ancient bugzilla entry since about 2004 (ugghhh) Signed-off-by: Alan Cox Signed-off-by: Bartlomiej Zolnierkiewicz --- Reading git-diff-tree failed