]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
nbd: add missing definition of pr_fmt
authorYu Kuai <yukuai3@huawei.com>
Sat, 23 Jul 2022 08:24:27 +0000 (16:24 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:22:41 +0000 (17:22 -0600)
commit 1243172d5894 ("nbd: use pr_err to output error message") tries
to define pr_fmt and use short pr_err() to output error message,
however, the definition is missed.

This patch also remove existing "nbd:" inside pr_err().

Fixes: 1243172d5894 ("nbd: use pr_err to output error message")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Link: https://lore.kernel.org/r/20220723082427.3890655-1-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/nbd.c

index f5d098a148cbfae330360e79c16aaf4286766694..2a709daefbc465c41f6e03f38382655e9a35b875 100644 (file)
@@ -11,6 +11,8 @@
  * (part of code stolen from loop.c)
  */
 
+#define pr_fmt(fmt) "nbd: " fmt
+
 #include <linux/major.h>
 
 #include <linux/blkdev.h>
@@ -1950,7 +1952,7 @@ again:
                             test_bit(NBD_DISCONNECT_REQUESTED, &nbd->flags)) ||
                            !refcount_inc_not_zero(&nbd->refs)) {
                                mutex_unlock(&nbd_index_mutex);
-                               pr_err("nbd: device at index %d is going down\n",
+                               pr_err("device at index %d is going down\n",
                                        index);
                                return -EINVAL;
                        }
@@ -1961,7 +1963,7 @@ again:
        if (!nbd) {
                nbd = nbd_dev_add(index, 2);
                if (IS_ERR(nbd)) {
-                       pr_err("nbd: failed to add new device\n");
+                       pr_err("failed to add new device\n");
                        return PTR_ERR(nbd);
                }
        }