From patchwork Sun Nov 21 19:21:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 346091 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 oALJLpo9014641 for ; Sun, 21 Nov 2010 19:21:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755129Ab0KUTVs (ORCPT ); Sun, 21 Nov 2010 14:21:48 -0500 Received: from mx2.netapp.com ([216.240.18.37]:39506 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751369Ab0KUTVq (ORCPT ); Sun, 21 Nov 2010 14:21:46 -0500 X-IronPort-AV: E=Sophos;i="4.59,232,1288594800"; d="scan'208";a="485296819" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 21 Nov 2010 11:21:33 -0800 Received: from heimdal.trondhjem.org.com ([10.58.57.137]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id oALJLTja027910; Sun, 21 Nov 2010 11:21:32 -0800 (PST) From: Trond Myklebust To: linux-nfs@vger.kernel.org Subject: [PATCH 5/8] NFS: Fix the error handling in "uncached_readdir()" Date: Sun, 21 Nov 2010 14:21:19 -0500 Message-Id: <1290367282-5445-5-git-send-email-Trond.Myklebust@netapp.com> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1290367282-5445-4-git-send-email-Trond.Myklebust@netapp.com> References: <1290367282-5445-1-git-send-email-Trond.Myklebust@netapp.com> <1290367282-5445-2-git-send-email-Trond.Myklebust@netapp.com> <1290367282-5445-3-git-send-email-Trond.Myklebust@netapp.com> <1290367282-5445-4-git-send-email-Trond.Myklebust@netapp.com> 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]); Sun, 21 Nov 2010 19:21:56 +0000 (UTC) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 353f47c..2492bac 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -766,10 +766,9 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent, desc->page_index = 0; desc->page = page; - if (nfs_readdir_xdr_to_array(desc, page, inode) == -1) { - status = -EIO; + status = nfs_readdir_xdr_to_array(desc, page, inode); + if (status < 0) goto out_release; - } status = nfs_do_filldir(desc, dirent, filldir);