]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/bio-integrity.c
cciss: add P700m to list of supported controllers
[linux-2.6-omap-h63xx.git] / fs / bio-integrity.c
index ba4ada08564a8d9ac7caff84c61fe321c7b61e3d..19caf7c962ace6c58868ed4fd2196212faf755ef 100644 (file)
@@ -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]);
@@ -150,11 +151,6 @@ int bio_integrity_add_page(struct bio *bio, struct page *page,
 }
 EXPORT_SYMBOL(bio_integrity_add_page);
 
-static struct blk_integrity *bdev_get_integrity(struct block_device *bdev)
-{
-       return bdev->bd_disk->integrity;
-}
-
 static int bdev_integrity_enabled(struct block_device *bdev, int rw)
 {
        struct blk_integrity *bi = bdev_get_integrity(bdev);