]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nfscl: fix delegation recall when the file is not open
authorRick Macklem <rmacklem@FreeBSD.org>
Sun, 25 Apr 2021 19:52:48 +0000 (12:52 -0700)
committerRick Macklem <rmacklem@FreeBSD.org>
Sun, 9 May 2021 03:00:38 +0000 (20:00 -0700)
commit9223cea0795f1ef2a5bb856908acc78416bbc966
treeaf95ca5fbdcb959d72035cfeae66ef6107946ca6
parent3c540c328d566fc6e60e489d0ed3aa4e50cd4e33
nfscl: fix delegation recall when the file is not open

Without this patch, if a NFSv4 server recalled a
delegation when the file is not open, the renew
thread would block in the NFS VOP_INACTIVE()
trying to acquire the client state lock that it
already holds.

This patch fixes the problem by delaying the
vrele() call until after the client state
lock is released.

This bug has been in the NFSv4 client for
a long time, but since it only affects
delegation when recalled due to another
client opening the file, it got missed
during previous testing.

Until you have this patch in your client,
you should avoid the use of delegations.

(cherry picked from commit 02695ea8909d818ceaa726f90f889889dfd39fac)
sys/fs/nfsclient/nfs_clstate.c