diff options
-rw-r--r-- | net/ceph/messenger.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index adca1e6537ab..4f1714c4c93b 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
@@ -61,7 +61,6 @@ static char addr_str[ADDR_STR_COUNT][MAX_ADDR_STR_LEN]; | |||
61 | static atomic_t addr_str_seq = ATOMIC_INIT(0); | 61 | static atomic_t addr_str_seq = ATOMIC_INIT(0); |
62 | 62 | ||
63 | static struct page *zero_page; /* used in certain error cases */ | 63 | static struct page *zero_page; /* used in certain error cases */ |
64 | static void *zero_page_address; /* kernel virtual addr of zero_page */ | ||
65 | 64 | ||
66 | const char *ceph_pr_addr(const struct sockaddr_storage *ss) | 65 | const char *ceph_pr_addr(const struct sockaddr_storage *ss) |
67 | { | 66 | { |
@@ -111,9 +110,6 @@ void _ceph_msgr_exit(void) | |||
111 | ceph_msgr_wq = NULL; | 110 | ceph_msgr_wq = NULL; |
112 | } | 111 | } |
113 | 112 | ||
114 | BUG_ON(zero_page_address == NULL); | ||
115 | zero_page_address = NULL; | ||
116 | |||
117 | BUG_ON(zero_page == NULL); | 113 | BUG_ON(zero_page == NULL); |
118 | kunmap(zero_page); | 114 | kunmap(zero_page); |
119 | page_cache_release(zero_page); | 115 | page_cache_release(zero_page); |
@@ -126,9 +122,6 @@ int ceph_msgr_init(void) | |||
126 | zero_page = ZERO_PAGE(0); | 122 | zero_page = ZERO_PAGE(0); |
127 | page_cache_get(zero_page); | 123 | page_cache_get(zero_page); |
128 | 124 | ||
129 | BUG_ON(zero_page_address != NULL); | ||
130 | zero_page_address = kmap(zero_page); | ||
131 | |||
132 | ceph_msgr_wq = alloc_workqueue("ceph-msgr", WQ_NON_REENTRANT, 0); | 125 | ceph_msgr_wq = alloc_workqueue("ceph-msgr", WQ_NON_REENTRANT, 0); |
133 | if (ceph_msgr_wq) | 126 | if (ceph_msgr_wq) |
134 | return 0; | 127 | return 0; |
@@ -889,7 +882,7 @@ static int write_partial_msg_pages(struct ceph_connection *con) | |||
889 | } else { | 882 | } else { |
890 | page = zero_page; | 883 | page = zero_page; |
891 | if (do_datacrc) | 884 | if (do_datacrc) |
892 | kaddr = zero_page_address; | 885 | kaddr = kmap(page); |
893 | } | 886 | } |
894 | len = min_t(int, max_write - con->out_msg_pos.page_pos, | 887 | len = min_t(int, max_write - con->out_msg_pos.page_pos, |
895 | total_max_write); | 888 | total_max_write); |
@@ -908,7 +901,7 @@ static int write_partial_msg_pages(struct ceph_connection *con) | |||
908 | con->out_msg_pos.page_pos + page_shift, | 901 | con->out_msg_pos.page_pos + page_shift, |
909 | len, 1); | 902 | len, 1); |
910 | 903 | ||
911 | if (do_datacrc && kaddr != zero_page_address) | 904 | if (do_datacrc) |
912 | kunmap(page); | 905 | kunmap(page); |
913 | 906 | ||
914 | if (ret <= 0) | 907 | if (ret <= 0) |