|
@@ -1295,6 +1295,7 @@ static void nfs_commitdata_release(void *data)
|
|
{
|
|
{
|
|
struct nfs_write_data *wdata = data;
|
|
struct nfs_write_data *wdata = data;
|
|
|
|
|
|
|
|
+ put_lseg(wdata->lseg);
|
|
put_nfs_open_context(wdata->args.context);
|
|
put_nfs_open_context(wdata->args.context);
|
|
nfs_commit_free(wdata);
|
|
nfs_commit_free(wdata);
|
|
}
|
|
}
|
|
@@ -1338,7 +1339,8 @@ static int nfs_initiate_commit(struct nfs_write_data *data, struct rpc_clnt *cln
|
|
* Set up the argument/result storage required for the RPC call.
|
|
* Set up the argument/result storage required for the RPC call.
|
|
*/
|
|
*/
|
|
static void nfs_init_commit(struct nfs_write_data *data,
|
|
static void nfs_init_commit(struct nfs_write_data *data,
|
|
- struct list_head *head)
|
|
|
|
|
|
+ struct list_head *head,
|
|
|
|
+ struct pnfs_layout_segment *lseg)
|
|
{
|
|
{
|
|
struct nfs_page *first = nfs_list_entry(head->next);
|
|
struct nfs_page *first = nfs_list_entry(head->next);
|
|
struct inode *inode = first->wb_context->path.dentry->d_inode;
|
|
struct inode *inode = first->wb_context->path.dentry->d_inode;
|
|
@@ -1350,6 +1352,7 @@ static void nfs_init_commit(struct nfs_write_data *data,
|
|
|
|
|
|
data->inode = inode;
|
|
data->inode = inode;
|
|
data->cred = first->wb_context->cred;
|
|
data->cred = first->wb_context->cred;
|
|
|
|
+ data->lseg = lseg; /* reference transferred */
|
|
data->mds_ops = &nfs_commit_ops;
|
|
data->mds_ops = &nfs_commit_ops;
|
|
|
|
|
|
data->args.fh = NFS_FH(data->inode);
|
|
data->args.fh = NFS_FH(data->inode);
|
|
@@ -1393,7 +1396,7 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how)
|
|
goto out_bad;
|
|
goto out_bad;
|
|
|
|
|
|
/* Set up the argument struct */
|
|
/* Set up the argument struct */
|
|
- nfs_init_commit(data, head);
|
|
|
|
|
|
+ nfs_init_commit(data, head, NULL);
|
|
return nfs_initiate_commit(data, NFS_CLIENT(inode), data->mds_ops, how);
|
|
return nfs_initiate_commit(data, NFS_CLIENT(inode), data->mds_ops, how);
|
|
out_bad:
|
|
out_bad:
|
|
nfs_retry_commit(head, NULL);
|
|
nfs_retry_commit(head, NULL);
|