Skip to content

Commit f5b4aee

Browse files
committed
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>
1 parent fa24708 commit f5b4aee

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

drivers/md/dm.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,8 +1872,6 @@ static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t,
18721872
struct queue_limits *limits)
18731873
{
18741874
struct dm_table *old_map;
1875-
struct request_queue *q = md->queue;
1876-
bool request_based = dm_table_request_based(t);
18771875
sector_t size;
18781876
int ret;
18791877

@@ -1894,7 +1892,7 @@ static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t,
18941892

18951893
dm_table_event_callback(t, event_callback, md);
18961894

1897-
if (request_based) {
1895+
if (dm_table_request_based(t)) {
18981896
/*
18991897
* Leverage the fact that request-based DM targets are
19001898
* 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,
19081906
goto out;
19091907
}
19101908

1911-
ret = dm_table_set_restrictions(t, q, limits);
1909+
ret = dm_table_set_restrictions(t, md->queue, limits);
19121910
if (ret) {
19131911
old_map = ERR_PTR(ret);
19141912
goto out;
@@ -1920,7 +1918,6 @@ static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t,
19201918

19211919
if (old_map)
19221920
dm_sync_table(md);
1923-
19241921
out:
19251922
return old_map;
19261923
}

0 commit comments

Comments
 (0)