From patchwork Tue Dec 7 22:16:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 384312 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 oB7MFF0S028965 for ; Tue, 7 Dec 2010 22:16:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753988Ab0LGWQz (ORCPT ); Tue, 7 Dec 2010 17:16:55 -0500 Received: from mx2.netapp.com ([216.240.18.37]:25959 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751561Ab0LGWQy (ORCPT ); Tue, 7 Dec 2010 17:16:54 -0500 X-IronPort-AV: E=Sophos;i="4.59,312,1288594800"; d="scan'208";a="492134128" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 07 Dec 2010 14:16:54 -0800 Received: from heimdal.trondhjem.org.com (sonala-lxp.hq.netapp.com [10.58.52.122] (may be forged)) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id oB7MGrRL020008; Tue, 7 Dec 2010 14:16:53 -0800 (PST) From: Trond Myklebust To: linux-nfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/2] NFS: nfs_readdir_search_for_cookie() don't mark as eof if cookie not found Date: Tue, 7 Dec 2010 17:16:47 -0500 Message-Id: <1291760208-11251-1-git-send-email-Trond.Myklebust@netapp.com> X-Mailer: git-send-email 1.7.3.2 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]); Tue, 07 Dec 2010 22:16:56 +0000 (UTC) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index d529e0e..ad2fde2 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -316,8 +316,9 @@ int nfs_readdir_search_for_cookie(struct nfs_cache_array *array, nfs_readdir_des } } if (i == array->eof_index) { - desc->eof = 1; status = -EBADCOOKIE; + if (*desc->dir_cookie == array->last_cookie) + desc->eof = 1; } out: return status;