What’s the filesystem you’re testing on? > On Dec 19, 2016, at 11:54, Anna Schumaker <schumaker.anna@xxxxxxxxx> wrote: > > Hi Trond, > > On 12/17/2016 01:27 PM, Trond Myklebust wrote: >> If an operation that modified the directory raced with a GETATTR, then we >> don't need to invalidate the directory cache more than once. > > This patch causes cthon basic tests to fail with: > > ./test6: readdir > ./test6: (/nfs/all) unlinked 'file.0' dir entry read pass 1 > ./test6: (/nfs/all) Test failed with 1 errors > basic tests failed > > Thanks, > Anna >> >> Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> >> --- >> fs/nfs/nfs4proc.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c >> index d33242c8d95d..713932440e07 100644 >> --- a/fs/nfs/nfs4proc.c >> +++ b/fs/nfs/nfs4proc.c >> @@ -1088,12 +1088,15 @@ static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo) >> struct nfs_inode *nfsi = NFS_I(dir); >> >> spin_lock(&dir->i_lock); >> + if (dir->i_version == cinfo->after) >> + goto out; >> nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA; >> if (!cinfo->atomic || cinfo->before != dir->i_version) >> nfs_force_lookup_revalidate(dir); >> dir->i_version = cinfo->after; >> nfsi->attr_gencount = nfs_inc_attr_generation_counter(); >> nfs_fscache_invalidate(dir); >> +out: >> spin_unlock(&dir->i_lock); >> } >> >> > ��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥