linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Colin King <colin.king@canonical.com>
To: Jens Axboe <axboe@kernel.dk>,
	Dan Schatzberg <schatzberg.dan@gmail.com>,
	linux-block@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][next] loop: Fix missing max_active argument in alloc_workqueue call
Date: Thu, 18 Mar 2021 15:16:26 +0000	[thread overview]
Message-ID: <20210318151626.17442-1-colin.king@canonical.com> (raw)

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


             reply	other threads:[~2021-03-18 15:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 15:16 Colin King [this message]
2021-03-18 19:18 ` [PATCH][next] loop: Fix missing max_active argument in alloc_workqueue call 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210318151626.17442-1-colin.king@canonical.com \
    --to=colin.king@canonical.com \
    --cc=axboe@kernel.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schatzberg.dan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).