From patchwork Sat Nov 27 18:24:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 361582 X-Patchwork-Delegate: Trond.Myklebust@netapp.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oARIO98O011806 for ; Sat, 27 Nov 2010 18:24:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752973Ab0K0SYH (ORCPT ); Sat, 27 Nov 2010 13:24:07 -0500 Received: from mx2.netapp.com ([216.240.18.37]:1509 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753145Ab0K0SYG convert rfc822-to-8bit (ORCPT ); Sat, 27 Nov 2010 13:24:06 -0500 X-IronPort-AV: E=Sophos;i="4.59,267,1288594800"; d="scan'208";a="487833753" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 27 Nov 2010 10:24:05 -0800 Received: from svlrsexc2-prd.hq.netapp.com (svlrsexc2-prd.hq.netapp.com [10.57.115.31]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id oARIO4i7014528; Sat, 27 Nov 2010 10:24:04 -0800 (PST) Received: from SACMVEXC2-PRD.hq.netapp.com ([10.99.115.17]) by svlrsexc2-prd.hq.netapp.com with Microsoft SMTPSVC(6.0.3790.3959); Sat, 27 Nov 2010 10:24:04 -0800 Received: from 10.58.56.216 ([10.58.56.216]) by SACMVEXC2-PRD.hq.netapp.com ([10.99.115.16]) with Microsoft Exchange Server HTTP-DAV ; Sat, 27 Nov 2010 18:24:04 +0000 Received: from heimdal.trondhjem.org by SACMVEXC2-PRD.hq.netapp.com; 27 Nov 2010 13:24:04 -0500 Subject: Re: [REGRESSION] git commit d1bacf9e "NFS: add readdir cache array" is bad From: Trond Myklebust To: Simon Kirby Cc: Guennadi Liakhovetski , linux-nfs@vger.kernel.org, "J. Bruce Fields" , Neil Brown , Bryan Schumaker , rees@umich.edu In-Reply-To: <20101127102732.GD12175@hostway.ca> References: <1290794726.4905.8.camel@heimdal.trondhjem.org> <20101127002548.GA20008@hostway.ca> <20101127102732.GD12175@hostway.ca> Organization: NetApp Inc Date: Sat, 27 Nov 2010 13:24:00 -0500 Message-ID: <1290882240.3415.5.camel@heimdal.trondhjem.org> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 (2.32.1-1.fc14) X-OriginalArrivalTime: 27 Nov 2010 18:24:04.0663 (UTC) FILETIME=[45A4E470:01CB8E60] Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 27 Nov 2010 18:24:11 +0000 (UTC) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 8ea4a41..f0a384e 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -395,13 +395,9 @@ int xdr_decode(nfs_readdir_descriptor_t *desc, struct nfs_entry *entry, struct x static int nfs_same_file(struct dentry *dentry, struct nfs_entry *entry) { - struct nfs_inode *node; if (dentry->d_inode == NULL) goto different; - node = NFS_I(dentry->d_inode); - if (node->fh.size != entry->fh->size) - goto different; - if (strncmp(node->fh.data, entry->fh->data, node->fh.size) != 0) + if (nfs_compare_fh(entry->fh, NFS_FH(dentry->d_inode)) != 0) goto different; return 1; different: