Skip to content

Commit

Permalink
rnbd-srv: don't pass a holder for non-exclusive blkdev_get_by_path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Jun 12, 2023
1 parent 29499ab commit 5ee6076
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/rnbd/rnbd-srv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5ee6076

Please sign in to comment.