rescan_partitions(): make device capacity errors non-fatal
authorAndrew Morton <akpm@linux-foundation.org>
Sat, 13 Sep 2008 09:33:25 +0000 (02:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Sep 2008 21:41:52 +0000 (14:41 -0700)
commit8d99f83b9478768d3a8d7d1bcd9bd182c75a0447
tree5ccc59694c9dc6dfad58c2e22463f1db55df8825
parent42cde4309b8f2671610be049352df2f8716e8809
rescan_partitions(): make device capacity errors non-fatal

Herton Krzesinski reports that the error-checking changes in
04ebd4aee52b06a2c38127d9208546e5b96f3a19 ("block/ioctl.c and
fs/partition/check.c: check value returned by add_partition") cause his
buggy USB camera to no longer mount.  "The camera is an Olympus X-840.
The original issue comes from the camera itself: its format program
creates a partition with an off by one error".

Buggy devices happen.  It is better for the kernel to warn and to proceed
with the mount.

Reported-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: Abdel Benamrouche <draconux@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/partitions/check.c