dm: remove unnecessary local variables in __bind
Bugzilla: https://bugzilla.redhat.com/2090507 Upstream Status: kernel/git/torvalds/linux.git commit f5b4aee10c024a35901cc2f1b9b4d80986a93937 Author: Mike Snitzer <snitzer@redhat.com> Date: Tue Feb 22 13:38:02 2022 -0500 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> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
This commit is contained in:
parent
4b8f49137c
commit
e9850a2a26
|
@ -1919,8 +1919,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;
|
||||
|
||||
|
@ -1941,7 +1939,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.
|
||||
|
@ -1955,7 +1953,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;
|
||||
|
@ -1967,7 +1965,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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue