author: Xiao Ni <xni@redhat.com> 2021-05-28 14:16:38 +0800
committer: Song Liu <song@kernel.org> 2021-06-10 19:40:14 -0700
commit: 9be148e408df7d361ec5afd6299b7736ff3928b0
parent: 41fe8d088e96472f63164e213de44ec77be69478
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 1 deletion
diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c
index 6cd7f7025df4..d8a91521144e 100644
--- a/crypto/async_tx/async_xor.c
+++ b/crypto/async_tx/async_xor.c
@@ -233,7 +233,8 @@ async_xor_offs(struct page *dest, unsigned int offset,
if (submit->flags & ASYNC_TX_XOR_DROP_DST) {
src_cnt--;
src_list++;
- src_offs++;
+ if (src_offs)
+ src_offs++;
}
/* wait for any prerequisite operations */