aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 6927a18b6891..cae5d160d835 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1295,6 +1295,7 @@ static void nfs_commitdata_release(void *data)
1295{ 1295{
1296 struct nfs_write_data *wdata = data; 1296 struct nfs_write_data *wdata = data;
1297 1297
1298 put_lseg(wdata->lseg);
1298 put_nfs_open_context(wdata->args.context); 1299 put_nfs_open_context(wdata->args.context);
1299 nfs_commit_free(wdata); 1300 nfs_commit_free(wdata);
1300} 1301}
@@ -1338,7 +1339,8 @@ static int nfs_initiate_commit(struct nfs_write_data *data, struct rpc_clnt *cln
1338 * Set up the argument/result storage required for the RPC call. 1339 * Set up the argument/result storage required for the RPC call.
1339 */ 1340 */
1340static void nfs_init_commit(struct nfs_write_data *data, 1341static void nfs_init_commit(struct nfs_write_data *data,
1341 struct list_head *head) 1342 struct list_head *head,
1343 struct pnfs_layout_segment *lseg)
1342{ 1344{
1343 struct nfs_page *first = nfs_list_entry(head->next); 1345 struct nfs_page *first = nfs_list_entry(head->next);
1344 struct inode *inode = first->wb_context->path.dentry->d_inode; 1346 struct inode *inode = first->wb_context->path.dentry->d_inode;
@@ -1350,6 +1352,7 @@ static void nfs_init_commit(struct nfs_write_data *data,
1350 1352
1351 data->inode = inode; 1353 data->inode = inode;
1352 data->cred = first->wb_context->cred; 1354 data->cred = first->wb_context->cred;
1355 data->lseg = lseg; /* reference transferred */
1353 data->mds_ops = &nfs_commit_ops; 1356 data->mds_ops = &nfs_commit_ops;
1354 1357
1355 data->args.fh = NFS_FH(data->inode); 1358 data->args.fh = NFS_FH(data->inode);
@@ -1393,7 +1396,7 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how)
1393 goto out_bad; 1396 goto out_bad;
1394 1397
1395 /* Set up the argument struct */ 1398 /* Set up the argument struct */
1396 nfs_init_commit(data, head); 1399 nfs_init_commit(data, head, NULL);
1397 return nfs_initiate_commit(data, NFS_CLIENT(inode), data->mds_ops, how); 1400 return nfs_initiate_commit(data, NFS_CLIENT(inode), data->mds_ops, how);
1398 out_bad: 1401 out_bad:
1399 nfs_retry_commit(head, NULL); 1402 nfs_retry_commit(head, NULL);