From: Chuck Lever Date: Mon, 13 Jan 2025 15:32:36 +0000 (-0500) Subject: NFS: CB_OFFLOAD can return NFS4ERR_DELAY X-Git-Tag: v6.14-rc1~53^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d2fc83c5df63f1391006ff7f734bfb794c76badd;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Chuck Lever Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker --- diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 7832fb0369a12..8397c43358bd1 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c @@ -718,7 +718,7 @@ __be32 nfs4_callback_offload(void *data, void *dummy, copy = kzalloc(sizeof(struct nfs4_copy_state), GFP_KERNEL); if (!copy) - return htonl(NFS4ERR_SERVERFAULT); + return cpu_to_be32(NFS4ERR_DELAY); spin_lock(&cps->clp->cl_lock); rcu_read_lock();