NFSD: Make nfsd4_setattr() wait before returning NFS4ERR_DELAY
authorChuck Lever <chuck.lever@oracle.com>
Thu, 8 Sep 2022 22:14:13 +0000 (18:14 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 26 Sep 2022 18:02:36 +0000 (14:02 -0400)
commit34b91dda7124fc3259e4b2ae53e0c933dedfec01
treea8acecaef866284c74efcb58f0d22c91cc12cdbc
parentc0aa1913db57219e91a0a8832363cbafb3a9cf8f
NFSD: Make nfsd4_setattr() wait before returning NFS4ERR_DELAY

nfsd_setattr() can kick off a CB_RECALL (via
notify_change() -> break_lease()) if a delegation is present. Before
returning NFS4ERR_DELAY, give the client holding that delegation a
chance to return it and then retry the nfsd_setattr() again, once.

Link: https://bugzilla.linux-nfs.org/show_bug.cgi?id=354
Tested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
fs/nfsd/vfs.c