diff options
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 625d8e5fb39d..fced7d1d48de 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -650,12 +650,17 @@ int nfs_fsync_dir(struct file *filp, struct dentry *dentry, int datasync) | |||
650 | */ | 650 | */ |
651 | static int nfs_check_verifier(struct inode *dir, struct dentry *dentry) | 651 | static int nfs_check_verifier(struct inode *dir, struct dentry *dentry) |
652 | { | 652 | { |
653 | unsigned long verf; | ||
654 | |||
653 | if (IS_ROOT(dentry)) | 655 | if (IS_ROOT(dentry)) |
654 | return 1; | 656 | return 1; |
657 | verf = (unsigned long)dentry->d_fsdata; | ||
655 | if ((NFS_I(dir)->cache_validity & NFS_INO_INVALID_ATTR) != 0 | 658 | if ((NFS_I(dir)->cache_validity & NFS_INO_INVALID_ATTR) != 0 |
656 | || nfs_attribute_timeout(dir)) | 659 | || nfs_attribute_timeout(dir) |
660 | || nfs_caches_unstable(dir) | ||
661 | || verf != NFS_I(dir)->cache_change_attribute) | ||
657 | return 0; | 662 | return 0; |
658 | return nfs_verify_change_attribute(dir, (unsigned long)dentry->d_fsdata); | 663 | return 1; |
659 | } | 664 | } |
660 | 665 | ||
661 | static inline void nfs_set_verifier(struct dentry * dentry, unsigned long verf) | 666 | static inline void nfs_set_verifier(struct dentry * dentry, unsigned long verf) |
@@ -665,8 +670,7 @@ static inline void nfs_set_verifier(struct dentry * dentry, unsigned long verf) | |||
665 | 670 | ||
666 | static void nfs_refresh_verifier(struct dentry * dentry, unsigned long verf) | 671 | static void nfs_refresh_verifier(struct dentry * dentry, unsigned long verf) |
667 | { | 672 | { |
668 | if (time_after(verf, (unsigned long)dentry->d_fsdata)) | 673 | nfs_set_verifier(dentry, verf); |
669 | nfs_set_verifier(dentry, verf); | ||
670 | } | 674 | } |
671 | 675 | ||
672 | /* | 676 | /* |