summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/rbd.c6
-rw-r--r--net/ceph/ceph_common.c2
-rw-r--r--net/ceph/osd_client.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index ed0c91d..3ba4836 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1342,7 +1342,6 @@ static struct ceph_osd_request *rbd_osd_req_create(
case OBJ_REQUEST_BIO:
rbd_assert(obj_request->bio_list != NULL);
osd_req->r_bio = obj_request->bio_list;
- bio_get(osd_req->r_bio);
/* osd client requires "num pages" even for bio */
osd_req->r_num_pages = calc_pages_for(offset, length);
break;
@@ -4149,6 +4148,11 @@ int __init rbd_init(void)
{
int rc;
+ if (!libceph_compatible(NULL)) {
+ rbd_warn(NULL, "libceph incompatibility (quitting)");
+
+ return -EINVAL;
+ }
rc = rbd_sysfs_init();
if (rc)
return rc;
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
index a98c03f..c236c235 100644
--- a/net/ceph/ceph_common.c
+++ b/net/ceph/ceph_common.c
@@ -39,7 +39,7 @@
*/
bool libceph_compatible(void *data)
{
- return false;
+ return true;
}
EXPORT_SYMBOL(libceph_compatible);
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 500ae8b..ba03648 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -147,10 +147,6 @@ void ceph_osdc_release_request(struct kref *kref)
if (req->r_own_pages)
ceph_release_page_vector(req->r_pages,
req->r_num_pages);
-#ifdef CONFIG_BLOCK
- if (req->r_bio)
- bio_put(req->r_bio);
-#endif
ceph_put_snap_context(req->r_snapc);
ceph_pagelist_release(&req->r_trail);
if (req->r_mempool)
OpenPOWER on IntegriCloud