From 4b841736bc16b320bcdb1e8ece585b3ced9a8811 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Sat, 29 Sep 2007 17:15:01 -0400 Subject: NFS: Fix nfs_verify_change_attribute() We don't care about whether or not some other process on our client is changing the directory while we're in nfs_lookup_revalidate(), because the dcache will take care of ensuring local atomicity. We can therefore remove the test for nfs_caches_unstable(). Signed-off-by: Trond Myklebust --- include/linux/nfs_fs.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index a765dd456922..0197b1243fe0 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -270,16 +270,16 @@ static inline unsigned long nfs_save_change_attribute(struct inode *dir) } /** - * nfs_verify_change_attribute - Detects NFS inode cache updates - * @inode - pointer to inode + * nfs_verify_change_attribute - Detects NFS remote directory changes + * @dir - pointer to parent directory inode * @chattr - previously saved change attribute - * Return "false" if metadata has been updated (or is in the process of - * being updated) since the change attribute was saved. + * Return "false" if the verifiers doesn't match the change attribute. + * This would usually indicate that the directory contents have changed on + * the server, and that any dentries need revalidating. */ -static inline int nfs_verify_change_attribute(struct inode *inode, unsigned long chattr) +static inline int nfs_verify_change_attribute(struct inode *dir, unsigned long chattr) { - return !nfs_caches_unstable(inode) - && chattr == NFS_I(inode)->cache_change_attribute; + return chattr == NFS_I(dir)->cache_change_attribute; } /* -- cgit v1.2.2