]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
NFSv4.1: pull out code from nfs_commit_release
authorFred Isaman <iisaman@netapp.com>
Wed, 23 Mar 2011 13:27:48 +0000 (13:27 +0000)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 23 Mar 2011 19:29:03 +0000 (15:29 -0400)
Create a separate support function for later use by data server
commit code.

Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/write.c

index dbc801810e759aef4e83ab83e162122fa293ee83..f5f005e9db48b65eb33b1efaf1b5f59ce20117ee 100644 (file)
@@ -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);
 }