Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm mpath: fix test for reinstate_path

Fix test for reinstate_path method before attempting to use it.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: Julia Lawall <julia@diku.dk>

+1 -1
+1 -1
drivers/md/dm-mpath.c
··· 871 871 if (pgpath->path.is_active) 872 872 goto out; 873 873 874 - if (!pgpath->pg->ps.type) { 874 + if (!pgpath->pg->ps.type->reinstate_path) { 875 875 DMWARN("Reinstate path not supported by path selector %s", 876 876 pgpath->pg->ps.type->name); 877 877 r = -EINVAL;