mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
rescan_partitions(): make device capacity errors non-fatal
Herton Krzesinski reports that the error-checking changes in
04ebd4aee5 ("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 <[email protected]>
Cc: Abdel Benamrouche <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
42cde4309b
commit
8d99f83b94
1 changed files with 2 additions and 2 deletions
|
|
@ -499,9 +499,9 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
|
|||
if (!size)
|
||||
continue;
|
||||
if (from + size > get_capacity(disk)) {
|
||||
printk(KERN_ERR " %s: p%d exceeds device capacity\n",
|
||||
printk(KERN_WARNING
|
||||
"%s: p%d exceeds device capacity\n",
|
||||
disk->disk_name, p);
|
||||
continue;
|
||||
}
|
||||
res = add_partition(disk, p, from, size, state->parts[p].flags);
|
||||
if (res) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue