Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296525
b: refs/heads/master
c: 0cdf9e6
h: refs/heads/master
i:
  296523: b3dfd15
v: v3
  • Loading branch information
Alex Elder committed Mar 22, 2012
1 parent 170c38b commit f21e3fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e36b13cceb46136d849aeee06b4907ad3570ba78
refs/heads/master: 0cdf9e60189a87356a865a96dbafc2240af5c91d
11 changes: 2 additions & 9 deletions trunk/net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ static char addr_str[ADDR_STR_COUNT][MAX_ADDR_STR_LEN];
static atomic_t addr_str_seq = ATOMIC_INIT(0);

static struct page *zero_page; /* used in certain error cases */
static void *zero_page_address; /* kernel virtual addr of zero_page */

const char *ceph_pr_addr(const struct sockaddr_storage *ss)
{
Expand Down Expand Up @@ -111,9 +110,6 @@ void _ceph_msgr_exit(void)
ceph_msgr_wq = NULL;
}

BUG_ON(zero_page_address == NULL);
zero_page_address = NULL;

BUG_ON(zero_page == NULL);
kunmap(zero_page);
page_cache_release(zero_page);
Expand All @@ -126,9 +122,6 @@ int ceph_msgr_init(void)
zero_page = ZERO_PAGE(0);
page_cache_get(zero_page);

BUG_ON(zero_page_address != NULL);
zero_page_address = kmap(zero_page);

ceph_msgr_wq = alloc_workqueue("ceph-msgr", WQ_NON_REENTRANT, 0);
if (ceph_msgr_wq)
return 0;
Expand Down Expand Up @@ -889,7 +882,7 @@ static int write_partial_msg_pages(struct ceph_connection *con)
} else {
page = zero_page;
if (do_datacrc)
kaddr = zero_page_address;
kaddr = kmap(page);
}
len = min_t(int, max_write - con->out_msg_pos.page_pos,
total_max_write);
Expand All @@ -908,7 +901,7 @@ static int write_partial_msg_pages(struct ceph_connection *con)
con->out_msg_pos.page_pos + page_shift,
len, 1);

if (do_datacrc && kaddr != zero_page_address)
if (do_datacrc)
kunmap(page);

if (ret <= 0)
Expand Down

0 comments on commit f21e3fb

Please sign in to comment.