diff options
| -rw-r--r-- | fs/nfs/dir.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index fced7d1d48de..469cf66e1dc0 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
| @@ -655,9 +655,7 @@ static int nfs_check_verifier(struct inode *dir, struct dentry *dentry) | |||
| 655 | if (IS_ROOT(dentry)) | 655 | if (IS_ROOT(dentry)) |
| 656 | return 1; | 656 | return 1; |
| 657 | verf = (unsigned long)dentry->d_fsdata; | 657 | verf = (unsigned long)dentry->d_fsdata; |
| 658 | if ((NFS_I(dir)->cache_validity & NFS_INO_INVALID_ATTR) != 0 | 658 | if (nfs_caches_unstable(dir) |
| 659 | || nfs_attribute_timeout(dir) | ||
| 660 | || nfs_caches_unstable(dir) | ||
| 661 | || verf != NFS_I(dir)->cache_change_attribute) | 659 | || verf != NFS_I(dir)->cache_change_attribute) |
| 662 | return 0; | 660 | return 0; |
| 663 | return 1; | 661 | return 1; |
| @@ -769,6 +767,10 @@ static int nfs_lookup_revalidate(struct dentry * dentry, struct nameidata *nd) | |||
| 769 | nfs_inc_stats(dir, NFSIOS_DENTRYREVALIDATE); | 767 | nfs_inc_stats(dir, NFSIOS_DENTRYREVALIDATE); |
| 770 | inode = dentry->d_inode; | 768 | inode = dentry->d_inode; |
| 771 | 769 | ||
| 770 | /* Revalidate parent directory attribute cache */ | ||
| 771 | if (nfs_revalidate_inode(NFS_SERVER(dir), dir) < 0) | ||
| 772 | goto out_zap_parent; | ||
| 773 | |||
| 772 | if (!inode) { | 774 | if (!inode) { |
| 773 | if (nfs_neg_need_reval(dir, dentry, nd)) | 775 | if (nfs_neg_need_reval(dir, dentry, nd)) |
| 774 | goto out_bad; | 776 | goto out_bad; |
| @@ -782,10 +784,6 @@ static int nfs_lookup_revalidate(struct dentry * dentry, struct nameidata *nd) | |||
| 782 | goto out_bad; | 784 | goto out_bad; |
| 783 | } | 785 | } |
| 784 | 786 | ||
| 785 | /* Revalidate parent directory attribute cache */ | ||
| 786 | if (nfs_revalidate_inode(NFS_SERVER(dir), dir) < 0) | ||
| 787 | goto out_zap_parent; | ||
| 788 | |||
| 789 | /* Force a full look up iff the parent directory has changed */ | 787 | /* Force a full look up iff the parent directory has changed */ |
| 790 | if (nfs_check_verifier(dir, dentry)) { | 788 | if (nfs_check_verifier(dir, dentry)) { |
| 791 | if (nfs_lookup_verify_inode(inode, nd)) | 789 | if (nfs_lookup_verify_inode(inode, nd)) |
