]> git.baikalelectronics.ru Git - kernel.git/commit
nfs: convert setclientid and exchange_id encoders to use clp->cl_owner_id
authorJeff Layton <jlayton@poochiereds.net>
Tue, 9 Jun 2015 23:43:57 +0000 (19:43 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 16 Jun 2015 15:15:31 +0000 (11:15 -0400)
commitabc783d41dac6eb27e03865bdac1b75da3c52a6f
treeacc786a4630b7f3f6615795f7837a126df470f4e
parentc043decc07c44f13c4e03958bbc983ebc32f7408
nfs: convert setclientid and exchange_id encoders to use clp->cl_owner_id

...instead of buffers that are part of their arg structs. We already
hold a reference to the client, so we might as well use the allocated
buffer. In the event that we can't allocate the clp->cl_owner_id, then
just return -ENOMEM.

Note too that we switch from a GFP_KERNEL allocation here to GFP_NOFS.
It's possible we could end up trying to do a SETCLIENTID or EXCHANGE_ID
in order to reclaim some memory, and the GFP_KERNEL allocations in the
existing code could cause recursion back into NFS reclaim.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4proc.c
fs/nfs/nfs4xdr.c
include/linux/nfs_xdr.h