We must ensure that the readdir data is always invalidated whether or not
the weak cache consistency data update succeeds.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
                }
                if (timespec_equal(&inode->i_mtime, &fattr->pre_mtime)) {
                        memcpy(&inode->i_mtime, &fattr->mtime, sizeof(inode->i_mtime));
+                       if (S_ISDIR(inode->i_mode))
+                               nfsi->cache_validity |= NFS_INO_INVALID_DATA;
                        nfsi->cache_change_attribute = now;
                }
                if (inode->i_size == fattr->pre_size && nfsi->npages == 0) {