Skip to content

Commit

Permalink
dm mpath: eliminate pg_ready() wrapper
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Snitzer committed Aug 1, 2014
1 parent 97e7cdf commit 6afbc01
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/md/dm-mpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6afbc01

Please sign in to comment.