diff options
author | Alex Elder <elder@inktank.com> | 2013-04-05 15:46:01 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-02 00:18:26 -0400 |
commit | ea96571f7b865edaf1acd472e6f2cddc9fb67892 (patch) | |
tree | f77ecb81c70e9e63ab875b53c2954780f70ddb84 | |
parent | 5476492fba9fd0b4118aacf5b924dd29b8cca56c (diff) |
libceph: fix possible CONFIG_BLOCK build problem
This patch:
15a0d7b libceph: record message data length
did not enclose some bio-specific code inside CONFIG_BLOCK as
it should have. Fix that.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
-rw-r--r-- | include/linux/ceph/messenger.h | 2 | ||||
-rw-r--r-- | net/ceph/messenger.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index b832c0ce899a..cdeebae03e0d 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h | |||
@@ -271,8 +271,10 @@ extern void ceph_msg_data_set_pages(struct ceph_msg *msg, struct page **pages, | |||
271 | size_t length, size_t alignment); | 271 | size_t length, size_t alignment); |
272 | extern void ceph_msg_data_set_pagelist(struct ceph_msg *msg, | 272 | extern void ceph_msg_data_set_pagelist(struct ceph_msg *msg, |
273 | struct ceph_pagelist *pagelist); | 273 | struct ceph_pagelist *pagelist); |
274 | #ifdef CONFIG_BLOCK | ||
274 | extern void ceph_msg_data_set_bio(struct ceph_msg *msg, struct bio *bio, | 275 | extern void ceph_msg_data_set_bio(struct ceph_msg *msg, struct bio *bio, |
275 | size_t length); | 276 | size_t length); |
277 | #endif /* CONFIG_BLOCK */ | ||
276 | 278 | ||
277 | extern struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags, | 279 | extern struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags, |
278 | bool can_fail); | 280 | bool can_fail); |
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index a6fda9532102..994192beda02 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
@@ -817,7 +817,7 @@ static bool ceph_msg_data_bio_advance(struct ceph_msg_data *data, size_t bytes) | |||
817 | 817 | ||
818 | return true; | 818 | return true; |
819 | } | 819 | } |
820 | #endif | 820 | #endif /* CONFIG_BLOCK */ |
821 | 821 | ||
822 | /* | 822 | /* |
823 | * For a page array, a piece comes from the first page in the array | 823 | * For a page array, a piece comes from the first page in the array |
@@ -3011,6 +3011,7 @@ void ceph_msg_data_set_pagelist(struct ceph_msg *msg, | |||
3011 | } | 3011 | } |
3012 | EXPORT_SYMBOL(ceph_msg_data_set_pagelist); | 3012 | EXPORT_SYMBOL(ceph_msg_data_set_pagelist); |
3013 | 3013 | ||
3014 | #ifdef CONFIG_BLOCK | ||
3014 | void ceph_msg_data_set_bio(struct ceph_msg *msg, struct bio *bio, | 3015 | void ceph_msg_data_set_bio(struct ceph_msg *msg, struct bio *bio, |
3015 | size_t length) | 3016 | size_t length) |
3016 | { | 3017 | { |
@@ -3028,6 +3029,7 @@ void ceph_msg_data_set_bio(struct ceph_msg *msg, struct bio *bio, | |||
3028 | msg->data_length = length; | 3029 | msg->data_length = length; |
3029 | } | 3030 | } |
3030 | EXPORT_SYMBOL(ceph_msg_data_set_bio); | 3031 | EXPORT_SYMBOL(ceph_msg_data_set_bio); |
3032 | #endif /* CONFIG_BLOCK */ | ||
3031 | 3033 | ||
3032 | /* | 3034 | /* |
3033 | * construct a new message with given type, size | 3035 | * construct a new message with given type, size |