Skip to content

Commit def052d

Browse files
committed
dm mpath: fix test for reinstate_path
Fix test for reinstate_path method before attempting to use it. Signed-off-by: Alasdair G Kergon <[email protected]> Cc: Julia Lawall <[email protected]>
1 parent 148acff commit def052d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/dm-mpath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ static int reinstate_path(struct pgpath *pgpath)
871871
if (pgpath->path.is_active)
872872
goto out;
873873

874-
if (!pgpath->pg->ps.type) {
874+
if (!pgpath->pg->ps.type->reinstate_path) {
875875
DMWARN("Reinstate path not supported by path selector %s",
876876
pgpath->pg->ps.type->name);
877877
r = -EINVAL;

0 commit comments

Comments
 (0)