The patch titled Subject: ocfs2: use memalloc_nofs_save instead of memalloc_noio_save has been added to the -mm tree. Its filename is ocfs2-use-memalloc_nofs_save-instead-of-memalloc_noio_save.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ocfs2-use-memalloc_nofs_save-instead-of-memalloc_noio_save.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-use-memalloc_nofs_save-instead-of-memalloc_noio_save.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: "Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx> Subject: ocfs2: use memalloc_nofs_save instead of memalloc_noio_save OCFS2 doesn't mind if memory reclaim makes I/Os happen; it just cares that it won't be reentered, so it can use memalloc_nofs_save() instead of memalloc_noio_save(). Link: http://lkml.kernel.org/r/20200326200214.1102-1-willy@xxxxxxxxxxxxx Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Reviewed-by: Joseph Qi <joseph.qi@xxxxxxxxxxxxxxxxx> Cc: Mark Fasheh <mark@xxxxxxxxxx> Cc: Joel Becker <jlbec@xxxxxxxxxxxx> Cc: Junxiao Bi <junxiao.bi@xxxxxxxxxx> Cc: Changwei Ge <gechangwei@xxxxxxx> Cc: Gang He <ghe@xxxxxxxx> Cc: Jun Piao <piaojun@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ocfs2/cluster/tcp.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) --- a/fs/ocfs2/cluster/tcp.c~ocfs2-use-memalloc_nofs_save-instead-of-memalloc_noio_save +++ a/fs/ocfs2/cluster/tcp.c @@ -1570,15 +1570,13 @@ static void o2net_start_connect(struct w struct sockaddr_in myaddr = {0, }, remoteaddr = {0, }; int ret = 0, stop; unsigned int timeout; - unsigned int noio_flag; + unsigned int nofs_flag; /* - * sock_create allocates the sock with GFP_KERNEL. We must set - * per-process flag PF_MEMALLOC_NOIO so that all allocations done - * by this process are done as if GFP_NOIO was specified. So we - * are not reentering filesystem while doing memory reclaim. + * sock_create allocates the sock with GFP_KERNEL. We must + * prevent the filesystem from being reentered by memory reclaim. */ - noio_flag = memalloc_noio_save(); + nofs_flag = memalloc_nofs_save(); /* if we're greater we initiate tx, otherwise we accept */ if (o2nm_this_node() <= o2net_num_from_nn(nn)) goto out; @@ -1683,7 +1681,7 @@ out: if (mynode) o2nm_node_put(mynode); - memalloc_noio_restore(noio_flag); + memalloc_nofs_restore(nofs_flag); return; } @@ -1810,15 +1808,13 @@ static int o2net_accept_one(struct socke struct o2nm_node *local_node = NULL; struct o2net_sock_container *sc = NULL; struct o2net_node *nn; - unsigned int noio_flag; + unsigned int nofs_flag; /* - * sock_create_lite allocates the sock with GFP_KERNEL. We must set - * per-process flag PF_MEMALLOC_NOIO so that all allocations done - * by this process are done as if GFP_NOIO was specified. So we - * are not reentering filesystem while doing memory reclaim. + * sock_create_lite allocates the sock with GFP_KERNEL. We must + * prevent the filesystem from being reentered by memory reclaim. */ - noio_flag = memalloc_noio_save(); + nofs_flag = memalloc_nofs_save(); BUG_ON(sock == NULL); *more = 0; @@ -1934,7 +1930,7 @@ out: if (sc) sc_put(sc); - memalloc_noio_restore(noio_flag); + memalloc_nofs_restore(nofs_flag); return ret; } _ Patches currently in -mm which might be from willy@xxxxxxxxxxxxx are ocfs2-use-memalloc_nofs_save-instead-of-memalloc_noio_save.patch mm-use-vm_fault-error-code-directly.patch mm-rename-arguments-to-find_subpage.patch mm-use-vm_bug_on_page-in-clear_page_dirty_for_io.patch mm-unexport-find_get_entry.patch mm-rewrite-pagecache_get_page-documentation.patch mm-improve-dump_page-for-compound-pages.patch mm-add-pagemaph-to-the-fine-documentation.patch mm-check-pagetail-in-hpage_nr_pages-even-when-thp.patch mm-optimise-find_subpage-for-thp.patch mm-remove-config_transparent_huge_pagecache.patch proc-inline-vma_stop-into-m_stop.patch proc-remove-m_cache_vma.patch proc-use-ppos-instead-of-m-version.patch seq_file-remove-m-version.patch proc-inline-m_next_vma-into-m_next.patch