Skip to content

Commit

Permalink
NFSv4.1: Exchange ID must use GFP_NOFS allocation mode
Browse files Browse the repository at this point in the history
Exchange ID can be called in a lease reclaim situation, so it
will deadlock if it then tries to write out dirty NFS pages.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed May 24, 2012
1 parent a9e6444 commit bbafffd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5192,20 +5192,20 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
clp->cl_rpcclient->cl_auth->au_flavor);

res.server_owner = kzalloc(sizeof(struct nfs41_server_owner),
GFP_KERNEL);
GFP_NOFS);
if (unlikely(res.server_owner == NULL)) {
status = -ENOMEM;
goto out;
}

res.server_scope = kzalloc(sizeof(struct nfs41_server_scope),
GFP_KERNEL);
GFP_NOFS);
if (unlikely(res.server_scope == NULL)) {
status = -ENOMEM;
goto out_server_owner;
}

res.impl_id = kzalloc(sizeof(struct nfs41_impl_id), GFP_KERNEL);
res.impl_id = kzalloc(sizeof(struct nfs41_impl_id), GFP_NOFS);
if (unlikely(res.impl_id == NULL)) {
status = -ENOMEM;
goto out_server_scope;
Expand Down

0 comments on commit bbafffd

Please sign in to comment.