From patchwork Thu Mar 3 15:13:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fred Isaman X-Patchwork-Id: 606321 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 p23FEkFc024674 for ; Thu, 3 Mar 2011 15:14:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756708Ab1CCPOv (ORCPT ); Thu, 3 Mar 2011 10:14:51 -0500 Received: from mx2.netapp.com ([216.240.18.37]:32592 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758085Ab1CCPOr (ORCPT ); Thu, 3 Mar 2011 10:14:47 -0500 X-IronPort-AV: E=Sophos;i="4.62,258,1297065600"; d="scan'208";a="525621744" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 03 Mar 2011 07:14:41 -0800 Received: from localhost.localdomain (nbodagal.hq.netapp.com [10.58.61.214] (may be forged)) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id p23FDvlY010654; Thu, 3 Mar 2011 07:14:40 -0800 (PST) From: Fred Isaman To: linux-nfs@vger.kernel.org Cc: Trond Myklebust Subject: [PATCH 9/9] NFSv4.1: Clear lseg pointer in ->doio function Date: Thu, 3 Mar 2011 10:13:49 -0500 Message-Id: <1299165229-3148-10-git-send-email-iisaman@netapp.com> X-Mailer: git-send-email 1.7.2.1 In-Reply-To: <1299165229-3148-1-git-send-email-iisaman@netapp.com> References: <1299165229-3148-1-git-send-email-iisaman@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.6 (demeter1.kernel.org [140.211.167.41]); Thu, 03 Mar 2011 15:14:57 +0000 (UTC) diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 9f62874..23e7944 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -312,7 +312,6 @@ static void nfs_pageio_doio(struct nfs_pageio_descriptor *desc) { if (!list_empty(&desc->pg_list)) { int error = desc->pg_doio(desc); - desc->pg_lseg = NULL; if (error < 0) desc->pg_error = error; else diff --git a/fs/nfs/read.c b/fs/nfs/read.c index ab9c776..4b764c6 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -311,6 +311,7 @@ static int nfs_pagein_multi(struct nfs_pageio_descriptor *desc) nbytes -= rsize; } while (nbytes != 0); put_lseg(lseg); + desc->pg_lseg = NULL; return ret; @@ -357,6 +358,7 @@ static int nfs_pagein_one(struct nfs_pageio_descriptor *desc) 0, lseg); out: put_lseg(lseg); + desc->pg_lseg = NULL; return ret; } diff --git a/fs/nfs/write.c b/fs/nfs/write.c index ccc7c22..bdb72f3 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -949,6 +949,7 @@ static int nfs_flush_multi(struct nfs_pageio_descriptor *desc) } while (nbytes != 0); put_lseg(lseg); + desc->pg_lseg = NULL; return ret; out_bad: @@ -1005,6 +1006,7 @@ static int nfs_flush_one(struct nfs_pageio_descriptor *desc) ret = nfs_write_rpcsetup(req, data, &nfs_write_full_ops, desc->pg_count, 0, lseg, desc->pg_ioflags); out: put_lseg(lseg); /* Cleans any gotten in ->pg_test */ + desc->pg_lseg = NULL; return ret; }