Commit cc09e8a
dm integrity: set journal entry unused when shrinking device
Commit f6f72f3 ("dm integrity: don't replay journal data past the
end of the device") skips journal replay if the target sector points
beyond the end of the device. Unfortunatelly, it doesn't set the
journal entry unused, which resulted in this BUG being triggered:
BUG_ON(!journal_entry_is_unused(je))
Fix this by calling journal_entry_set_unused() for this case.
Fixes: f6f72f3 ("dm integrity: don't replay journal data past the end of the device")
Cc: stable@vger.kernel.org # v5.7+
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Tested-by: Milan Broz <gmazyland@gmail.com>
[snitzer: revised header]
Signed-off-by: Mike Snitzer <snitzer@kernel.org>1 parent dbdcc90 commit cc09e8a
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2472 | 2472 | | |
2473 | 2473 | | |
2474 | 2474 | | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
2475 | 2479 | | |
2476 | | - | |
2477 | | - | |
2478 | 2480 | | |
2479 | 2481 | | |
2480 | 2482 | | |
| |||
0 commit comments