Commit fa56f90
dm-integrity: fix a typo in the code for write/discard race
[ Upstream commit c698b7f ]
If we send a write followed by a discard, it may be possible that the
discarded data end up being overwritten by the previous write from the
journal. The code tries to prevent that, but there was a typo in this
logic that made it not being activated as it should be.
Note that if we end up here the second time (when discard_retried is
true), it means that the write bio is actually racing with the discard
bio, and in this situation it is not specified which of them should win.
Cc: stable@vger.kernel.org
Fixes: 31843ed ("dm integrity: improve discard in journal mode")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent eb2cf62 commit fa56f90
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2298 | 2298 | | |
2299 | 2299 | | |
2300 | 2300 | | |
2301 | | - | |
| 2301 | + | |
2302 | 2302 | | |
2303 | 2303 | | |
2304 | 2304 | | |
| |||
0 commit comments