]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
nfs: set verifier on existing dentries in nfs_prime_dcache
authorJeff Layton <jlayton@redhat.com>
Thu, 4 Jul 2013 10:35:23 +0000 (06:35 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 9 Jul 2013 21:16:39 +0000 (17:16 -0400)
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>
fs/nfs/dir.c

index 0fac2cb1ea18648d8befee687f3086f771b8b74a..bd7e1cc53b9076489270ac75060b5f0d6a90fccc 100644 (file)
@@ -450,6 +450,7 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry)
        dentry = d_lookup(parent, &filename);
        if (dentry != NULL) {
                if (nfs_same_file(dentry, entry)) {
+                       nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
                        status = nfs_refresh_inode(dentry->d_inode, entry->fattr);
                        if (!status)
                                nfs_setsecurity(dentry->d_inode, entry->fattr, entry->label);