Return-Path: Received: from mx2.netapp.com ([216.240.18.37]:20886 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755447Ab1CWMai (ORCPT ); Wed, 23 Mar 2011 08:30:38 -0400 From: Fred Isaman To: linux-nfs@vger.kernel.org Cc: Trond Myklebust Subject: [PATCH 05/11] NFSv4.1: pull out code from nfs_commit_release Date: Wed, 23 Mar 2011 08:30:06 -0400 Message-Id: <1300883412-32296-6-git-send-email-iisaman@netapp.com> In-Reply-To: <1300883412-32296-1-git-send-email-iisaman@netapp.com> References: <1300883412-32296-1-git-send-email-iisaman@netapp.com> Sender: linux-nfs-owner@vger.kernel.org List-ID: Content-Type: text/plain MIME-Version: 1.0 Create a separate support function for later use by data server commit code. Signed-off-by: Fred Isaman --- fs/nfs/write.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/nfs/write.c b/fs/nfs/write.c index dbc8018..f5f005e 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1409,10 +1409,9 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata) return; } -static void nfs_commit_release(void *calldata) +static void nfs_commit_release_pages(struct nfs_write_data *data) { - struct nfs_write_data *data = calldata; - struct nfs_page *req; + struct nfs_page *req; int status = data->task.tk_status; while (!list_empty(&data->pages)) { @@ -1446,6 +1445,13 @@ static void nfs_commit_release(void *calldata) next: nfs_clear_page_tag_locked(req); } +} + +static void nfs_commit_release(void *calldata) +{ + struct nfs_write_data *data = calldata; + + nfs_commit_release_pages(data); nfs_commit_clear_lock(NFS_I(data->inode)); nfs_commitdata_release(calldata); } -- 1.7.2.1