Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69257
b: refs/heads/master
c: 57fa76f
h: refs/heads/master
i:
  69255: a93bc61
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 9, 2007
1 parent 7177425 commit 3d16aab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47aabaa7e45385fee4a535a6f6e523ff944e1684
refs/heads/master: 57fa76f2da05d0fee597b26bbc1f05242252beab
11 changes: 10 additions & 1 deletion trunk/fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,7 @@ static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc)
.len = entry->len,
};
struct inode *inode;
unsigned long verf = nfs_save_change_attribute(dir);

switch (name.len) {
case 2:
Expand All @@ -1120,6 +1121,14 @@ static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc)
if (name.name[0] == '.')
return dget(parent);
}

spin_lock(&dir->i_lock);
if (NFS_I(dir)->cache_validity & NFS_INO_INVALID_DATA) {
spin_unlock(&dir->i_lock);
return NULL;
}
spin_unlock(&dir->i_lock);

name.hash = full_name_hash(name.name, name.len);
dentry = d_lookup(parent, &name);
if (dentry != NULL) {
Expand Down Expand Up @@ -1161,7 +1170,7 @@ static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc)
}

out_renew:
nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
nfs_set_verifier(dentry, verf);
return dentry;
}

Expand Down

0 comments on commit 3d16aab

Please sign in to comment.