OSDN Git Service

NFS: Label the dentry with a verifier in nfs_rmdir() and nfs_unlink()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 8 Jul 2021 01:43:09 +0000 (21:43 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 4 Oct 2021 00:49:05 +0000 (20:49 -0400)
commit9019fb391de02cbff422090768b73afe9f6174df
tree0657b31898a880c04b043b8c2a531042443e6d89
parent342a67f0884293639bd17ea44df754ead799e669
NFS: Label the dentry with a verifier in nfs_rmdir() and nfs_unlink()

After the success of an operation such as rmdir() or unlink(), we expect
to add the dentry back to the dcache as an ordinary negative dentry.
However in NFS, unless it is labelled with the appropriate verifier for
the parent directory state, then nfs_lookup_revalidate will end up
discarding that dentry and forcing a new lookup.

The fix is to ensure that we relabel the dentry appropriately on
success.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/dir.c