提交 b04accc4 编写于 作者: J Jens Axboe

block: revert part of d7533ad0e132f92e75c1b2eb7c26387b25a583c1

We need bdev_get_integrity() to support the pending md/dm patches.
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 8deaf721
...@@ -150,11 +150,6 @@ int bio_integrity_add_page(struct bio *bio, struct page *page, ...@@ -150,11 +150,6 @@ int bio_integrity_add_page(struct bio *bio, struct page *page,
} }
EXPORT_SYMBOL(bio_integrity_add_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) static int bdev_integrity_enabled(struct block_device *bdev, int rw)
{ {
struct blk_integrity *bi = bdev_get_integrity(bdev); struct blk_integrity *bi = bdev_get_integrity(bdev);
......
...@@ -1016,6 +1016,12 @@ extern int blk_integrity_compare(struct block_device *, struct block_device *); ...@@ -1016,6 +1016,12 @@ extern int blk_integrity_compare(struct block_device *, struct block_device *);
extern int blk_rq_map_integrity_sg(struct request *, struct scatterlist *); extern int blk_rq_map_integrity_sg(struct request *, struct scatterlist *);
extern int blk_rq_count_integrity_sg(struct request *); extern int blk_rq_count_integrity_sg(struct request *);
static inline
struct blk_integrity *bdev_get_integrity(struct block_device *bdev)
{
return bdev->bd_disk->integrity;
}
static inline int blk_integrity_rq(struct request *rq) static inline int blk_integrity_rq(struct request *rq)
{ {
if (rq->bio == NULL) if (rq->bio == NULL)
...@@ -1029,6 +1035,7 @@ static inline int blk_integrity_rq(struct request *rq) ...@@ -1029,6 +1035,7 @@ static inline int blk_integrity_rq(struct request *rq)
#define blk_integrity_rq(rq) (0) #define blk_integrity_rq(rq) (0)
#define blk_rq_count_integrity_sg(a) (0) #define blk_rq_count_integrity_sg(a) (0)
#define blk_rq_map_integrity_sg(a, b) (0) #define blk_rq_map_integrity_sg(a, b) (0)
#define bdev_get_integrity(a) (0)
#define blk_integrity_compare(a, b) (0) #define blk_integrity_compare(a, b) (0)
#define blk_integrity_register(a, b) (0) #define blk_integrity_register(a, b) (0)
#define blk_integrity_unregister(a) do { } while (0); #define blk_integrity_unregister(a) do { } while (0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册