Skip to content

Commit

Permalink
NFS: Read requests can use GFP_KERNEL.
Browse files Browse the repository at this point in the history
There is no danger of deadlock should the allocation trigger page
writeback.

Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed May 14, 2010
1 parent 18eb884 commit 93870d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/nfs/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static mempool_t *nfs_rdata_mempool;

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) {
memset(p, 0, sizeof(*p));
Expand All @@ -50,7 +50,7 @@ struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount)
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_KERNEL);
if (!p->pagevec) {
mempool_free(p, nfs_rdata_mempool);
p = NULL;
Expand Down

0 comments on commit 93870d7

Please sign in to comment.