Commit 93870d76 authored by Trond Myklebust's avatar Trond Myklebust

NFS: Read requests can use GFP_KERNEL.

There is no danger of deadlock should the allocation trigger page
writeback.
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 18eb8842
...@@ -40,7 +40,7 @@ static mempool_t *nfs_rdata_mempool; ...@@ -40,7 +40,7 @@ static mempool_t *nfs_rdata_mempool;
struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount) struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount)
{ {
struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, GFP_NOFS); struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, GFP_KERNEL);
if (p) { if (p) {
memset(p, 0, sizeof(*p)); memset(p, 0, sizeof(*p));
...@@ -50,7 +50,7 @@ struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount) ...@@ -50,7 +50,7 @@ struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount)
if (pagecount <= ARRAY_SIZE(p->page_array)) if (pagecount <= ARRAY_SIZE(p->page_array))
p->pagevec = p->page_array; p->pagevec = p->page_array;
else { else {
p->pagevec = kcalloc(pagecount, sizeof(struct page *), GFP_NOFS); p->pagevec = kcalloc(pagecount, sizeof(struct page *), GFP_KERNEL);
if (!p->pagevec) { if (!p->pagevec) {
mempool_free(p, nfs_rdata_mempool); mempool_free(p, nfs_rdata_mempool);
p = NULL; p = NULL;
......
Markdown is supported
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