mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 08:02:07 +00: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 <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
parent
15cb6f39db
commit
df699cc16e
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user