diff options
| author | Mike Snitzer <snitzer@redhat.com> | 2014-07-08 11:55:09 -0400 |
|---|---|---|
| committer | Mike Snitzer <snitzer@redhat.com> | 2014-07-08 12:17:12 -0400 |
| commit | 2122e57c913cd842e5061137a7093bd06e728677 (patch) | |
| tree | ddbed21ed6b8abc0366a445297e3bcca9fa973c4 | |
| parent | a10ddcd784bf1f1117b6e63f45d8819f24805592 (diff) | |
| download | linux-dm-2122e57c913cd842e5061137a7093bd06e728677.tar.gz | |
dm mpath: eliminate pg_ready() wrapper
Notice: this object is not reachable from any branch.
pg_ready() is not comprehensive in its logic and only serves to
obfuscate code. Replace pg_ready() with the appropriate logic in
multipath_map().
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Notice: this object is not reachable from any branch.
| -rw-r--r-- | drivers/md/dm-mpath.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index f4167b013d990..833d7e752f063 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -373,8 +373,6 @@ static int __must_push_back(struct multipath *m) dm_noflush_suspending(m->ti))); } -#define pg_ready(m) (!(m)->queue_io && !(m)->pg_init_required) - /* * Map cloned requests */ @@ -402,11 +400,11 @@ static int multipath_map(struct dm_target *ti, struct request *clone, if (!__must_push_back(m)) r = -EIO; /* Failed */ goto out_unlock; - } - if (!pg_ready(m)) { + } else if (m->queue_io || m->pg_init_required) { __pg_init_all_paths(m); goto out_unlock; } + if (set_mapinfo(m, map_context) < 0) /* ENOMEM, requeue */ goto out_unlock; |
