diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-04-09 12:01:26 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-04-09 12:01:26 +0800 |
commit | f75c8ea7d10c66cda333ce8a2400f2bdf07d1523 (patch) | |
tree | 34b7a742084e711d1168301d44809c3d730b87e3 /net | |
parent | 34263dcbef6a0b9987c93b8f9b05a761309ae816 (diff) | |
parent | af15ae47855e0f0e0172f912ae38d1c50f7fe27f (diff) |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/messenger.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index b8d927c56494..a6b2f2138c9d 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -7,6 +7,7 @@ #include <linux/kthread.h> #include <linux/net.h> #include <linux/nsproxy.h> +#include <linux/sched.h> #include <linux/slab.h> #include <linux/socket.h> #include <linux/string.h> @@ -478,11 +479,16 @@ static int ceph_tcp_connect(struct ceph_connection *con) { struct sockaddr_storage *paddr = &con->peer_addr.in_addr; struct socket *sock; + unsigned int noio_flag; int ret; BUG_ON(con->sock); + + /* sock_create_kern() allocates with GFP_KERNEL */ + noio_flag = memalloc_noio_save(); ret = sock_create_kern(read_pnet(&con->msgr->net), paddr->ss_family, SOCK_STREAM, IPPROTO_TCP, &sock); + memalloc_noio_restore(noio_flag); if (ret) return ret; sock->sk->sk_allocation = GFP_NOFS; |