Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbafffd2 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFSv4.1: Exchange ID must use GFP_NOFS allocation mode



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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent a9e64442
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -5192,20 +5192,20 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
				clp->cl_rpcclient->cl_auth->au_flavor);
				clp->cl_rpcclient->cl_auth->au_flavor);


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


	res.server_scope = kzalloc(sizeof(struct nfs41_server_scope),
	res.server_scope = kzalloc(sizeof(struct nfs41_server_scope),
					GFP_KERNEL);
					GFP_NOFS);
	if (unlikely(res.server_scope == NULL)) {
	if (unlikely(res.server_scope == NULL)) {
		status = -ENOMEM;
		status = -ENOMEM;
		goto out_server_owner;
		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)) {
	if (unlikely(res.impl_id == NULL)) {
		status = -ENOMEM;
		status = -ENOMEM;
		goto out_server_scope;
		goto out_server_scope;