Commit 49d686cc authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

ublk: remove the empty open and release block device operations

No need to define empty versions, they can just be left out.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20220721130916.1869719-4-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 5f8bcc83
...@@ -208,19 +208,8 @@ static inline int ublk_queue_cmd_buf_size(struct ublk_device *ub, int q_id) ...@@ -208,19 +208,8 @@ static inline int ublk_queue_cmd_buf_size(struct ublk_device *ub, int q_id)
PAGE_SIZE); PAGE_SIZE);
} }
static int ublk_open(struct block_device *bdev, fmode_t mode)
{
return 0;
}
static void ublk_release(struct gendisk *disk, fmode_t mode)
{
}
static const struct block_device_operations ub_fops = { static const struct block_device_operations ub_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = ublk_open,
.release = ublk_release,
}; };
#define UBLK_MAX_PIN_PAGES 32 #define UBLK_MAX_PIN_PAGES 32
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment