Skip to content

Commit

Permalink
dm: remove unnecessary local variables in __bind
Browse files Browse the repository at this point in the history
Also remove empty newline before 'out:' label at end of __bind.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Mike Snitzer committed Feb 22, 2022
1 parent fa24708 commit f5b4aee
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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.
Expand All @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit f5b4aee

Please sign in to comment.