Skip to content

Commit cda57a1

Browse files
jtlaytonTrond Myklebust
authored andcommitted
nfs: set verifier on existing dentries in nfs_prime_dcache
nfs_prime_dcache currently only sets the verifier when it doesn't initially a matching dentry in the dcache. Set the verifier in the case where we do find a dentry in the dcache. This ensures that we don't have to look up the dentry again if we want to use it after a readdir. Cc: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
1 parent a82a729 commit cda57a1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎fs/nfs/dir.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry)
450450
dentry = d_lookup(parent, &filename);
451451
if (dentry != NULL) {
452452
if (nfs_same_file(dentry, entry)) {
453+
nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
453454
status = nfs_refresh_inode(dentry->d_inode, entry->fattr);
454455
if (!status)
455456
nfs_setsecurity(dentry->d_inode, entry->fattr, entry->label);

0 commit comments

Comments
 (0)