mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
blk: fix overflow in queue_discard_max_hw_show
We get this right for queue_discard_max_show but not max_hw_show. Follow the same pattern as queue_discard_max_show instead so that we don't truncate. Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
3d65ae4634
commit
18f922d037
1 changed files with 2 additions and 3 deletions
|
|
@ -147,10 +147,9 @@ static ssize_t queue_discard_granularity_show(struct request_queue *q, char *pag
|
|||
|
||||
static ssize_t queue_discard_max_hw_show(struct request_queue *q, char *page)
|
||||
{
|
||||
unsigned long long val;
|
||||
|
||||
val = q->limits.max_hw_discard_sectors << 9;
|
||||
return sprintf(page, "%llu\n", val);
|
||||
return sprintf(page, "%llu\n",
|
||||
(unsigned long long)q->limits.max_hw_discard_sectors << 9);
|
||||
}
|
||||
|
||||
static ssize_t queue_discard_max_show(struct request_queue *q, char *page)
|
||||
|
|
|
|||
Loading…
Reference in a new issue