Commit 59d9cb91 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'ceph-for-4.11-rc4' of git://

Pull ceph fix from Ilya Dryomov:
 "A fix for a writeback deadlock caused by a GFP_KERNEL allocation on
  the reclaim path, tagged for stable"

* tag 'ceph-for-4.11-rc4' of git://
  libceph: force GFP_NOIO for socket allocations
parents 2056b7c7 633ee407
......@@ -7,6 +7,7 @@
#include <linux/kthread.h>
#include <linux/net.h>
#include <linux/nsproxy.h>
#include <linux/sched/mm.h>
#include <linux/slab.h>
#include <linux/socket.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 socket *sock;
unsigned int noio_flag;
int ret;
/* sock_create_kern() allocates with GFP_KERNEL */
noio_flag = memalloc_noio_save();
ret = sock_create_kern(read_pnet(&con->msgr->net), paddr->ss_family,
if (ret)
return ret;
sock->sk->sk_allocation = GFP_NOFS;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment