rnbd-srv: don't pass a holder for non-exclusive blkdev_get_by_path
authorChristoph Hellwig <hch@lst.de>
Thu, 8 Jun 2023 11:02:41 +0000 (13:02 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Jun 2023 14:04:04 +0000 (08:04 -0600)
Passing a holder to blkdev_get_by_path when FMODE_EXCL isn't set doesn't
make sense, so pass NULL instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Christian Brauner <brauner@kernel.org>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Link: https://lore.kernel.org/r/20230608110258.189493-14-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rnbd/rnbd-srv.c

index 0352c25..a92a428 100644 (file)
@@ -715,7 +715,7 @@ static int process_msg_open(struct rnbd_srv_session *srv_sess,
                goto reject;
        }
 
-       bdev = blkdev_get_by_path(full_path, open_flags, THIS_MODULE, NULL);
+       bdev = blkdev_get_by_path(full_path, open_flags, NULL, NULL);
        if (IS_ERR(bdev)) {
                ret = PTR_ERR(bdev);
                pr_err("Opening device '%s' on session %s failed, failed to open the block device, err: %d\n",