Skip to content

Commit

Permalink
NFS: CB_OFFLOAD can return NFS4ERR_DELAY
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chuck Lever authored and Anna Schumaker committed Jan 21, 2025
1 parent 90190ba commit d2fc83c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/callback_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d2fc83c

Please sign in to comment.