Linux Device Mapper development
 help / color / mirror / Atom feed
* [PATCH v1 36/54] dm-crypt: don't clear bvec->bv_page in crypt_free_buffer_pages()
       [not found] <1482854706-14128-1-git-send-email-tom.leiming@gmail.com>
@ 2016-12-27 16:04 ` Ming Lei
  2016-12-27 16:04 ` [PATCH v1 37/54] dm-crypt: convert to bio_for_each_segment_all_sp() Ming Lei
  1 sibling, 0 replies; 2+ messages in thread
From: Ming Lei @ 2016-12-27 16:04 UTC (permalink / raw)
  To: Jens Axboe, linux-kernel
  Cc: linux-block, Christoph Hellwig, Ming Lei, Alasdair Kergon,
	Mike Snitzer, maintainer:DEVICE-MAPPER LVM, Shaohua Li,
	open list:SOFTWARE RAID Multiple Disks SUPPORT

The bio is always freed after running crypt_free_buffer_pages(),
so it isn't necessary to clear the bv->bv_page.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
 drivers/md/dm-crypt.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index 7c6c57216bf2..593cdf88bf5f 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -1042,7 +1042,6 @@ static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone)
 	bio_for_each_segment_all(bv, clone, i) {
 		BUG_ON(!bv->bv_page);
 		mempool_free(bv->bv_page, cc->page_pool);
-		bv->bv_page = NULL;
 	}
 }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH v1 37/54] dm-crypt: convert to bio_for_each_segment_all_sp()
       [not found] <1482854706-14128-1-git-send-email-tom.leiming@gmail.com>
  2016-12-27 16:04 ` [PATCH v1 36/54] dm-crypt: don't clear bvec->bv_page in crypt_free_buffer_pages() Ming Lei
@ 2016-12-27 16:04 ` Ming Lei
  1 sibling, 0 replies; 2+ messages in thread
From: Ming Lei @ 2016-12-27 16:04 UTC (permalink / raw)
  To: Jens Axboe, linux-kernel
  Cc: linux-block, Christoph Hellwig, Ming Lei, Alasdair Kergon,
	Mike Snitzer, maintainer:DEVICE-MAPPER LVM, Shaohua Li,
	open list:SOFTWARE RAID Multiple Disks SUPPORT

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
 drivers/md/dm-crypt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index 593cdf88bf5f..c6932fb85418 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -1038,8 +1038,9 @@ static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone)
 {
 	unsigned int i;
 	struct bio_vec *bv;
+	struct bvec_iter_all bia;
 
-	bio_for_each_segment_all(bv, clone, i) {
+	bio_for_each_segment_all_sp(bv, clone, i, bia) {
 		BUG_ON(!bv->bv_page);
 		mempool_free(bv->bv_page, cc->page_pool);
 	}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-27 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1482854706-14128-1-git-send-email-tom.leiming@gmail.com>
2016-12-27 16:04 ` [PATCH v1 36/54] dm-crypt: don't clear bvec->bv_page in crypt_free_buffer_pages() Ming Lei
2016-12-27 16:04 ` [PATCH v1 37/54] dm-crypt: convert to bio_for_each_segment_all_sp() Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox