]> 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, 25 Apr 2021 19:55:00 +0000 (12:55 -0700)
commit02695ea8909d818ceaa726f90f889889dfd39fac
tree4f2e8300478eea8767af3696e7ca1e3bd280cf32
parent7d222ce3c10bdc23c8dc92d6b13e376ede5840d5
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.

MFC after: 2 weeks
sys/fs/nfsclient/nfs_clstate.c