mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
block: fix get_max_io_size()
A previous commit aligning splits to physical block sizes inadvertently modified one return case such that that it now returns 0 length splits when the number of sectors doesn't exceed the physical offset. This later hits a case of 0 in bio_split(). Restore the previous working behavior. Change-Id: I5d4b36862fb7f7202996bcaa2c4b7d71b49e6ba6 Fixes:9cc5169cd4("block: Improve physical block alignment of split bios") Reported-by: Eric Deal <[email protected]> Signed-off-by: Keith Busch <[email protected]> Cc: Bart Van Assche <[email protected]> Cc: [email protected] Signed-off-by: Jens Axboe <[email protected]> Git-commit:f09dbec9c0Git-repo: https://android.googlesource.com/kernel/common/ Signed-off-by: Pradeep P V K <[email protected]>
This commit is contained in:
parent
bcb3f4fc7d
commit
1154754b7b
1 changed files with 1 additions and 1 deletions
|
|
@ -154,7 +154,7 @@ static inline unsigned get_max_io_size(struct request_queue *q,
|
|||
if (max_sectors > start_offset)
|
||||
return max_sectors - start_offset;
|
||||
|
||||
return sectors & (lbs - 1);
|
||||
return sectors & ~(lbs - 1);
|
||||
}
|
||||
|
||||
static inline unsigned get_max_segment_size(const struct request_queue *q,
|
||||
|
|
|
|||
Loading…
Reference in a new issue