+++ /dev/null
-From: Peter Zijlstra <a.p.zijlstra@chello.nl>
-Subject: nfs: fix various memory recursions possible with swap over NFS.
-Patch-mainline: No
-References: FATE#303834
-
-GFP_NOFS is _more_ permissive than GFP_NOIO in that it will initiate IO,
-just not of any filesystem data.
-
-The problem is that previuosly NOFS was correct because that avoids
-recursion into the NFS code, it now is not, because also IO (swap) can
-lead to this recursion.
-
-Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
-Acked-by: Neil Brown <neilb@suse.de>
-Acked-by: Suresh Jayaraman <sjayaraman@suse.de>
-
----
- fs/nfs/pagelist.c | 2 +-
- fs/nfs/write.c | 6 +++---
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-Index: linux-2.6.26/fs/nfs/write.c
-===================================================================
---- linux-2.6.26.orig/fs/nfs/write.c
-+++ linux-2.6.26/fs/nfs/write.c
-@@ -47,7 +47,7 @@ static mempool_t *nfs_commit_mempool;
-
- struct nfs_write_data *nfs_commitdata_alloc(void)
- {
-- struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, GFP_NOFS);
-+ struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, GFP_NOIO);
-
- if (p) {
- memset(p, 0, sizeof(*p));
-@@ -65,7 +65,7 @@ void nfs_commit_free(struct nfs_write_da
-
- struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount)
- {
-- struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, GFP_NOFS);
-+ struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, GFP_NOIO);
-
- if (p) {
- memset(p, 0, sizeof(*p));
-@@ -74,7 +74,7 @@ struct nfs_write_data *nfs_writedata_all
- if (pagecount <= ARRAY_SIZE(p->page_array))
- p->pagevec = p->page_array;
- else {
-- p->pagevec = kcalloc(pagecount, sizeof(struct page *), GFP_NOFS);
-+ p->pagevec = kcalloc(pagecount, sizeof(struct page *), GFP_NOIO);
- if (!p->pagevec) {
- mempool_free(p, nfs_wdata_mempool);
- p = NULL;
-Index: linux-2.6.26/fs/nfs/pagelist.c
-===================================================================
---- linux-2.6.26.orig/fs/nfs/pagelist.c
-+++ linux-2.6.26/fs/nfs/pagelist.c
-@@ -27,7 +27,7 @@ static inline struct nfs_page *
- nfs_page_alloc(void)
- {
- struct nfs_page *p;
-- p = kmem_cache_alloc(nfs_page_cachep, GFP_KERNEL);
-+ p = kmem_cache_alloc(nfs_page_cachep, GFP_NOIO);
- if (p) {
- memset(p, 0, sizeof(*p));
- INIT_LIST_HEAD(&p->wb_list);