]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nfscl: Avoid KASSERT() panic in cache_enter_time()
authorRick Macklem <rmacklem@FreeBSD.org>
Wed, 14 Jul 2021 20:33:37 +0000 (13:33 -0700)
committerRick Macklem <rmacklem@FreeBSD.org>
Wed, 14 Jul 2021 20:33:37 +0000 (13:33 -0700)
commit7f5508fe78d17af968fe67e00ffa7c975aa2c67d
treea05b19480745f3128d6207636ac2c41bdcd1d8b2
parentd1a0eab9fbc426ed8cbbddcd90720180c44ce36b
nfscl: Avoid KASSERT() panic in cache_enter_time()

Commit 844aa31c6d87 added cache_enter_time_flags(), specifically
so that the NFS client could specify that cache enter replace
any stale entry for the same name.  Doing so avoids a KASSERT()
panic() in cache_enter_time(), as reported by the PR.

This patch uses cache_enter_time_flags() for Readdirplus, to
avoid the panic(), since it is impossible for the NFS client
to know if another client (or a local process on the NFS server)
has replaced a file with another file of the same name.

This patch only affects NFS mounts that use the "rdirplus"
mount option.

There may be other places in the NFS client where this needs
to be done, but no panic() has been observed during testing.

PR: 257043
MFC after: 2 weeks
sys/fs/nfsclient/nfs_clrpcops.c