dm writecache: report invalid return from writecache_map helpers

If some "writecache_map_*" function returns invalid state, it is a bug.
So, we should report it and not fail silently.

Signed-off-by: Mikulas Patocka <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
This commit is contained in:
Mikulas Patocka authored and Mike Snitzer committed 2021-08-10 13:27:48 -04:00
1 parent 15cb6f39db
commit df699cc16e
1 file changed
+4 -1
+4 -1
View File
@@ -1545,10 +1545,13 @@ done:
return DM_MAPIO_SUBMITTED;
case WC_MAP_ERROR:
default:
wc_unlock(wc);
bio_io_error(bio);
return DM_MAPIO_SUBMITTED;
default:
BUG();
return -1;
}
}