aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2022-02-22 13:38:02 -0500
committerMike Snitzer <snitzer@redhat.com>2022-02-22 13:55:53 -0500
commitf5b4aee10c024a35901cc2f1b9b4d80986a93937 (patch)
tree583b1ff5161fef1f9055203875d7653312c22262 /drivers/md/dm.c
parentfa247089de9936a46e290d4724cb5f0b845600f5 (diff)
dm: remove unnecessary local variables in __bind
Also remove empty newline before 'out:' label at end of __bind. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 3640ef4bf327..454d39bc7745 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1872,8 +1872,6 @@ static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t,
struct queue_limits *limits)
{
struct dm_table *old_map;
- struct request_queue *q = md->queue;
- bool request_based = dm_table_request_based(t);
sector_t size;
int ret;
@@ -1894,7 +1892,7 @@ static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t,
dm_table_event_callback(t, event_callback, md);
- if (request_based) {
+ if (dm_table_request_based(t)) {
/*
* Leverage the fact that request-based DM targets are
* immutable singletons - used to optimize dm_mq_queue_rq.
@@ -1908,7 +1906,7 @@ static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t,
goto out;
}
- ret = dm_table_set_restrictions(t, q, limits);
+ ret = dm_table_set_restrictions(t, md->queue, limits);
if (ret) {
old_map = ERR_PTR(ret);
goto out;
@@ -1920,7 +1918,6 @@ static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t,
if (old_map)
dm_sync_table(md);
-
out:
return old_map;
}