From 1377e8bfb4fdf494aac3ec4925018170a2107406 Mon Sep 17 00:00:00 2001 From: "Martin K. Petersen" Date: Wed, 1 Oct 2008 03:38:37 -0400 Subject: [PATCH] --- yaml --- r: 110564 b: refs/heads/master c: 74aa8c2cc010035a7eef2b4ca4d6430e0dae206a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/bio-integrity.c | 3 ++- trunk/include/linux/bio.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index d297c6ebe49c..a110f6417591 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b04accc425d52ca59699290661e0dfd09b0feeeb +refs/heads/master: 74aa8c2cc010035a7eef2b4ca4d6430e0dae206a diff --git a/trunk/fs/bio-integrity.c b/trunk/fs/bio-integrity.c index 6e28dcdd23a2..19caf7c962ac 100644 --- a/trunk/fs/bio-integrity.c +++ b/trunk/fs/bio-integrity.c @@ -107,7 +107,8 @@ void bio_integrity_free(struct bio *bio, struct bio_set *bs) BUG_ON(bip == NULL); /* A cloned bio doesn't own the integrity metadata */ - if (!bio_flagged(bio, BIO_CLONED) && bip->bip_buf != NULL) + if (!bio_flagged(bio, BIO_CLONED) && !bio_flagged(bio, BIO_FS_INTEGRITY) + && bip->bip_buf != NULL) kfree(bip->bip_buf); mempool_free(bip->bip_vec, bs->bvec_pools[bip->bip_pool]); diff --git a/trunk/include/linux/bio.h b/trunk/include/linux/bio.h index 98c2d0570657..d86d39d490e6 100644 --- a/trunk/include/linux/bio.h +++ b/trunk/include/linux/bio.h @@ -109,6 +109,7 @@ struct bio { #define BIO_EOPNOTSUPP 7 /* not supported */ #define BIO_CPU_AFFINE 8 /* complete bio on same CPU as submitted */ #define BIO_NULL_MAPPED 9 /* contains invalid user pages */ +#define BIO_FS_INTEGRITY 10 /* fs owns integrity data, not block layer */ #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag))) /*