projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15cb6f3
)
dm writecache: report invalid return from writecache_map helpers
author
Mikulas Patocka
<mpatocka@redhat.com>
Tue, 27 Jul 2021 13:45:13 +0000
(09:45 -0400)
committer
Mike Snitzer
<snitzer@redhat.com>
Tue, 10 Aug 2021 17:27:48 +0000
(13:27 -0400)
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>
drivers/md/dm-writecache.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm-writecache.c
b/drivers/md/dm-writecache.c
index
64d7a79
..
e89868c
100644
(file)
--- a/
drivers/md/dm-writecache.c
+++ b/
drivers/md/dm-writecache.c
@@
-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;
}
}