From: Hannes Reinecke Date: Tue, 18 Oct 2016 06:40:31 +0000 (+0900) Subject: block: update chunk_sectors in blk_stack_limits() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=987b3b26eb7b19960160505faf9b2f50ae77e14d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git block: update chunk_sectors in blk_stack_limits() Signed-off-by: Hannes Reinecke Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Shaun Tancheff Tested-by: Shaun Tancheff Signed-off-by: Jens Axboe --- diff --git a/block/blk-settings.c b/block/blk-settings.c index b1d5b7fa4d07..55369a65dea2 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -631,6 +631,10 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, t->discard_granularity; } + if (b->chunk_sectors) + t->chunk_sectors = min_not_zero(t->chunk_sectors, + b->chunk_sectors); + return ret; } EXPORT_SYMBOL(blk_stack_limits);