From: Alasdair G Kergon Date: Mon, 21 Jul 2008 11:00:31 +0000 (+0100) Subject: dm mpath: fix test for reinstate_path X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=def052d21c4e77975bb75cf212f018ec913f8e2f;p=linux-beck.git dm mpath: fix test for reinstate_path Fix test for reinstate_path method before attempting to use it. Signed-off-by: Alasdair G Kergon Cc: Julia Lawall --- diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 230d7890ec8a..fea966d66f98 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -871,7 +871,7 @@ static int reinstate_path(struct pgpath *pgpath) if (pgpath->path.is_active) goto out; - if (!pgpath->pg->ps.type) { + if (!pgpath->pg->ps.type->reinstate_path) { DMWARN("Reinstate path not supported by path selector %s", pgpath->pg->ps.type->name); r = -EINVAL;