aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/messenger.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-01-31 16:02:01 -0600
committerSage Weil <sage@inktank.com>2013-02-13 18:27:40 -0800
commit3ebc21f7bc2f9c0145bbbf0f12430b766a200f9f (patch)
tree1434bd538dcd99ae38044580b29d83db84a1a06d /net/ceph/messenger.c
parent695b711933689ea51af782760f4b1e2c6a42a631 (diff)
downloadkernel_goldelico_gta04-3ebc21f7bc2f9c0145bbbf0f12430b766a200f9f.zip
kernel_goldelico_gta04-3ebc21f7bc2f9c0145bbbf0f12430b766a200f9f.tar.gz
kernel_goldelico_gta04-3ebc21f7bc2f9c0145bbbf0f12430b766a200f9f.tar.bz2
libceph: fix messenger CONFIG_BLOCK dependencies
The ceph messenger has a few spots that are only used when bio messages are supported, and that's only when CONFIG_BLOCK is defined. This surrounds a couple of spots with #ifdef's that would cause a problem if CONFIG_BLOCK were not present in the kernel configuration. This resolves: http://tracker.ceph.com/issues/3976 Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'net/ceph/messenger.c')
-rw-r--r--net/ceph/messenger.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 5ccf87e..8a62a55 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -9,8 +9,9 @@
#include <linux/slab.h>
#include <linux/socket.h>
#include <linux/string.h>
+#ifdef CONFIG_BLOCK
#include <linux/bio.h>
-#include <linux/blkdev.h>
+#endif /* CONFIG_BLOCK */
#include <linux/dns_resolver.h>
#include <net/tcp.h>
@@ -2651,9 +2652,11 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags,
m->page_alignment = 0;
m->pages = NULL;
m->pagelist = NULL;
+#ifdef CONFIG_BLOCK
m->bio = NULL;
m->bio_iter = NULL;
m->bio_seg = 0;
+#endif /* CONFIG_BLOCK */
m->trail = NULL;
/* front */