|
@@ -7,6 +7,7 @@
|
|
#include <linux/kthread.h>
|
|
#include <linux/kthread.h>
|
|
#include <linux/net.h>
|
|
#include <linux/net.h>
|
|
#include <linux/nsproxy.h>
|
|
#include <linux/nsproxy.h>
|
|
|
|
+#include <linux/sched/mm.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/socket.h>
|
|
#include <linux/socket.h>
|
|
#include <linux/string.h>
|
|
#include <linux/string.h>
|
|
@@ -469,11 +470,16 @@ static int ceph_tcp_connect(struct ceph_connection *con)
|
|
{
|
|
{
|
|
struct sockaddr_storage *paddr = &con->peer_addr.in_addr;
|
|
struct sockaddr_storage *paddr = &con->peer_addr.in_addr;
|
|
struct socket *sock;
|
|
struct socket *sock;
|
|
|
|
+ unsigned int noio_flag;
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
BUG_ON(con->sock);
|
|
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,
|
|
ret = sock_create_kern(read_pnet(&con->msgr->net), paddr->ss_family,
|
|
SOCK_STREAM, IPPROTO_TCP, &sock);
|
|
SOCK_STREAM, IPPROTO_TCP, &sock);
|
|
|
|
+ memalloc_noio_restore(noio_flag);
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
sock->sk->sk_allocation = GFP_NOFS;
|
|
sock->sk->sk_allocation = GFP_NOFS;
|