mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 22:34:33 +01:00
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:
1 parent
15cb6f39db
commit
df699cc16e
1 file changed
+4
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user