[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1490881776-28735-5-git-send-email-dmonakhov@openvz.org>
Date: Thu, 30 Mar 2017 17:49:32 +0400
From: Dmitry Monakhov <dmonakhov@...nvz.org>
To: linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
martin.petersen@...cle.com
Cc: Dmitry Monakhov <dmonakhov@...nvz.org>
Subject: [PATCH 4/8] bio-integrity: bio_trim should truncate integrity vector accordingly
Signed-off-by: Dmitry Monakhov <dmonakhov@...nvz.org>
---
block/bio.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/block/bio.c b/block/bio.c
index e75878f..fa84323 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1907,6 +1907,10 @@ void bio_trim(struct bio *bio, int offset, int size)
bio_advance(bio, offset << 9);
bio->bi_iter.bi_size = size;
+
+ if (bio_integrity(bio))
+ bio_integrity_trim(bio, 0, size);
+
}
EXPORT_SYMBOL_GPL(bio_trim);
--
2.9.3
Powered by blists - more mailing lists