Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFS: CB_OFFLOAD can return NFS4ERR_DELAY

RFC 7862 permits the callback service to respond to a CB_OFFLOAD
operation with NFS4ERR_DELAY. Use that instead of
NFS4ERR_SERVERFAULT for temporary memory allocation failure, as that
is more consistent with how other operations report memory
allocation failure.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>

authored by

Chuck Lever and committed by
Anna Schumaker
d2fc83c5 90190ba1

+1 -1
+1 -1
fs/nfs/callback_proc.c
··· 718 718 719 719 copy = kzalloc(sizeof(struct nfs4_copy_state), GFP_KERNEL); 720 720 if (!copy) 721 - return htonl(NFS4ERR_SERVERFAULT); 721 + return cpu_to_be32(NFS4ERR_DELAY); 722 722 723 723 spin_lock(&cps->clp->cl_lock); 724 724 rcu_read_lock();