mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -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 <eric.deal@wdc.com> Signed-off-by: Keith Busch <kbusch@kernel.org> Cc: Bart Van Assche <bvanassche@acm.org> Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk> Git-commit:f09dbec9c0Git-repo: https://android.googlesource.com/kernel/common/ Signed-off-by: Pradeep P V K <ppvk@codeaurora.org>
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