diff options
Diffstat (limited to 'fs/dlm/lowcomms.c')
-rw-r--r-- | fs/dlm/lowcomms.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 3962262f991..103a5ebd137 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
@@ -295,6 +295,7 @@ static int add_sock(struct socket *sock, struct connection *con) | |||
295 | con->sock->sk->sk_write_space = lowcomms_write_space; | 295 | con->sock->sk->sk_write_space = lowcomms_write_space; |
296 | con->sock->sk->sk_state_change = lowcomms_state_change; | 296 | con->sock->sk->sk_state_change = lowcomms_state_change; |
297 | con->sock->sk->sk_user_data = con; | 297 | con->sock->sk->sk_user_data = con; |
298 | con->sock->sk->sk_allocation = GFP_NOFS; | ||
298 | return 0; | 299 | return 0; |
299 | } | 300 | } |
300 | 301 | ||
@@ -823,7 +824,6 @@ static void sctp_init_assoc(struct connection *con) | |||
823 | len = e->len; | 824 | len = e->len; |
824 | offset = e->offset; | 825 | offset = e->offset; |
825 | spin_unlock(&con->writequeue_lock); | 826 | spin_unlock(&con->writequeue_lock); |
826 | kmap(e->page); | ||
827 | 827 | ||
828 | /* Send the first block off the write queue */ | 828 | /* Send the first block off the write queue */ |
829 | iov[0].iov_base = page_address(e->page)+offset; | 829 | iov[0].iov_base = page_address(e->page)+offset; |
@@ -854,7 +854,6 @@ static void sctp_init_assoc(struct connection *con) | |||
854 | 854 | ||
855 | if (e->len == 0 && e->users == 0) { | 855 | if (e->len == 0 && e->users == 0) { |
856 | list_del(&e->list); | 856 | list_del(&e->list); |
857 | kunmap(e->page); | ||
858 | free_entry(e); | 857 | free_entry(e); |
859 | } | 858 | } |
860 | spin_unlock(&con->writequeue_lock); | 859 | spin_unlock(&con->writequeue_lock); |
@@ -1203,8 +1202,6 @@ void *dlm_lowcomms_get_buffer(int nodeid, int len, gfp_t allocation, char **ppc) | |||
1203 | 1202 | ||
1204 | if (e) { | 1203 | if (e) { |
1205 | got_one: | 1204 | got_one: |
1206 | if (users == 0) | ||
1207 | kmap(e->page); | ||
1208 | *ppc = page_address(e->page) + offset; | 1205 | *ppc = page_address(e->page) + offset; |
1209 | return e; | 1206 | return e; |
1210 | } | 1207 | } |
@@ -1233,7 +1230,6 @@ void dlm_lowcomms_commit_buffer(void *mh) | |||
1233 | if (users) | 1230 | if (users) |
1234 | goto out; | 1231 | goto out; |
1235 | e->len = e->end - e->offset; | 1232 | e->len = e->end - e->offset; |
1236 | kunmap(e->page); | ||
1237 | spin_unlock(&con->writequeue_lock); | 1233 | spin_unlock(&con->writequeue_lock); |
1238 | 1234 | ||
1239 | if (!test_and_set_bit(CF_WRITE_PENDING, &con->flags)) { | 1235 | if (!test_and_set_bit(CF_WRITE_PENDING, &con->flags)) { |
@@ -1272,7 +1268,6 @@ static void send_to_sock(struct connection *con) | |||
1272 | offset = e->offset; | 1268 | offset = e->offset; |
1273 | BUG_ON(len == 0 && e->users == 0); | 1269 | BUG_ON(len == 0 && e->users == 0); |
1274 | spin_unlock(&con->writequeue_lock); | 1270 | spin_unlock(&con->writequeue_lock); |
1275 | kmap(e->page); | ||
1276 | 1271 | ||
1277 | ret = 0; | 1272 | ret = 0; |
1278 | if (len) { | 1273 | if (len) { |
@@ -1294,7 +1289,6 @@ static void send_to_sock(struct connection *con) | |||
1294 | 1289 | ||
1295 | if (e->len == 0 && e->users == 0) { | 1290 | if (e->len == 0 && e->users == 0) { |
1296 | list_del(&e->list); | 1291 | list_del(&e->list); |
1297 | kunmap(e->page); | ||
1298 | free_entry(e); | 1292 | free_entry(e); |
1299 | continue; | 1293 | continue; |
1300 | } | 1294 | } |