f2fs/fscrypt-ice: disallow bio merged into request
This fixes wrong bio merge into request which breaks encrypted ICE blocks.
Bug: 71554412
Change-Id: I65b5936add01aa62449d46791a736b734022a48c
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
diff --git a/block/blk-merge.c b/block/blk-merge.c
index f44daa1..c71d1cb 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -876,6 +876,8 @@ bool blk_rq_merge_ok(struct request *rq, struct bio *bio)
int blk_try_merge(struct request *rq, struct bio *bio)
{
+ if (blk_rq_dun(rq) || bio_dun(bio))
+ return ELEVATOR_NO_MERGE;
if (blk_rq_pos(rq) + blk_rq_sectors(rq) == bio->bi_iter.bi_sector)
return ELEVATOR_BACK_MERGE;
else if (blk_rq_pos(rq) - bio_sectors(bio) == bio->bi_iter.bi_sector)