diff options
author | Alex Elder <elder@inktank.com> | 2013-01-31 17:02:01 -0500 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-02-13 21:27:40 -0500 |
commit | 3ebc21f7bc2f9c0145bbbf0f12430b766a200f9f (patch) | |
tree | 1434bd538dcd99ae38044580b29d83db84a1a06d /net/ceph | |
parent | 695b711933689ea51af782760f4b1e2c6a42a631 (diff) |
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')
-rw-r--r-- | net/ceph/messenger.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 5ccf87ed8d68..8a62a559a2aa 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
@@ -9,8 +9,9 @@ | |||
9 | #include <linux/slab.h> | 9 | #include <linux/slab.h> |
10 | #include <linux/socket.h> | 10 | #include <linux/socket.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #ifdef CONFIG_BLOCK | ||
12 | #include <linux/bio.h> | 13 | #include <linux/bio.h> |
13 | #include <linux/blkdev.h> | 14 | #endif /* CONFIG_BLOCK */ |
14 | #include <linux/dns_resolver.h> | 15 | #include <linux/dns_resolver.h> |
15 | #include <net/tcp.h> | 16 | #include <net/tcp.h> |
16 | 17 | ||
@@ -2651,9 +2652,11 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags, | |||
2651 | m->page_alignment = 0; | 2652 | m->page_alignment = 0; |
2652 | m->pages = NULL; | 2653 | m->pages = NULL; |
2653 | m->pagelist = NULL; | 2654 | m->pagelist = NULL; |
2655 | #ifdef CONFIG_BLOCK | ||
2654 | m->bio = NULL; | 2656 | m->bio = NULL; |
2655 | m->bio_iter = NULL; | 2657 | m->bio_iter = NULL; |
2656 | m->bio_seg = 0; | 2658 | m->bio_seg = 0; |
2659 | #endif /* CONFIG_BLOCK */ | ||
2657 | m->trail = NULL; | 2660 | m->trail = NULL; |
2658 | 2661 | ||
2659 | /* front */ | 2662 | /* front */ |