mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
nfs: don't skip revalidate on directory delegation when attrs flagged stale
On a local directory mutation (rename/create/unlink) the client marks CHANGE / MTIME / CTIME as invalid in NFS_I(dir)->cache_validity. When a subsequent stat(2) enters __nfs_revalidate_inode() and finds a directory delegation held, the function currently early-exits and returns the cached (now stale) mtime to userspace without sending a GETATTR RPC. Keep the early-exit for the fast path, but take the RPC when CHANGE, MTIME, or CTIME are already marked invalid. The delegation alone is not a guarantee of cached-attr freshness once the code itself has flagged the cache as stale. Assisted-by: Claude:claude-opus-4-7 [bpftrace] [tshark] Signed-off-by: Tom Haynes <loghyr@gmail.com> [Anna: Use NFS_INO_INVALID_ATTR insteado of individual NFS_INO_INVALID_* flags] Signed-off-by: Anna Schumaker <anna@kernel.org>
This commit is contained in:
parent
60e7870052
commit
84800a8d1d
1 changed files with 2 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue