linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] loop: Fix missing max_active argument in alloc_workqueue call
@ 2021-03-18 15:16 Colin King
  2021-03-18 19:18 ` Muhammad Usama Anjum
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Colin King @ 2021-03-18 15:16 UTC (permalink / raw)
  To: Jens Axboe, Dan Schatzberg, linux-block; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The 3rd argument to alloc_workqueue should be the max_active count,
however currently it is the lo->lo_number that is intended for the
loop%d number. Fix this by adding in the missing max_active count.

Addresses-Coverity: ("Missing argument to printf")
Fixes: 08ad7f822739 ("loop: Use worker per cgroup instead of kworker")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/block/loop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index f2f9e4127847..ee2a6c1bc093 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1192,7 +1192,7 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
 	lo->workqueue = alloc_workqueue("loop%d",
 					WQ_UNBOUND | WQ_FREEZABLE |
 					WQ_MEM_RECLAIM,
-					lo->lo_number);
+					1, lo->lo_number);
 	if (!lo->workqueue) {
 		error = -ENOMEM;
 		goto out_unlock;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-03-19 15:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 15:16 [PATCH][next] loop: Fix missing max_active argument in alloc_workqueue call Colin King
2021-03-18 19:18 ` Muhammad Usama Anjum
2021-03-18 20:12 ` Jens Axboe
2021-03-18 20:24   ` Colin Ian King
2021-03-18 20:42     ` Jens Axboe
2021-03-19  9:47       ` Dan Carpenter
2021-03-19 10:03         ` Krzysztof Kozlowski
2021-03-19 13:02         ` Jens Axboe
2021-03-19  9:59       ` Krzysztof Kozlowski
2021-03-19 13:05         ` Jens Axboe
2021-03-19 15:51   ` Dan Schatzberg
2021-03-19 15:54 ` Dan Schatzberg
2021-03-19 15:56   ` Colin Ian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).