[PATCH 1/5] SQUASHME pnfs-submit: pnfs_try_to_commit can release nfs_write_data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andy Adamson <andros@xxxxxxxxxx>

So don't reference nfs_write_data.

Signed-off-by: Andy Adamson <andros@xxxxxxxxxx>
---
 fs/nfs/pnfs.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 3018ed6..56c3af4 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1373,7 +1373,7 @@ enum pnfs_try_status
 pnfs_try_to_commit(struct nfs_write_data *data,
 		    const struct rpc_call_ops *call_ops, int sync)
 {
-	struct nfs_inode *nfsi = NFS_I(data->inode);
+	struct inode *inode = data->inode;
 	struct nfs_server *nfss = NFS_SERVER(data->inode);
 	enum pnfs_try_status trypnfs;
 
@@ -1389,12 +1389,12 @@ pnfs_try_to_commit(struct nfs_write_data *data,
 	data->pdata.call_ops = call_ops;
 	data->pdata.how = sync;
 	data->pdata.lseg = NULL;
-	trypnfs = nfss->pnfs_curr_ld->ld_io_ops->commit(nfsi->layout,
+	trypnfs = nfss->pnfs_curr_ld->ld_io_ops->commit(NFS_I(inode)->layout,
 							sync, data);
 	if (trypnfs == PNFS_NOT_ATTEMPTED)
 		_pnfs_clear_lseg_from_pages(&data->pages);
 	else
-		nfs_inc_stats(data->inode, NFSIOS_PNFS_COMMIT);
+		nfs_inc_stats(inode, NFSIOS_PNFS_COMMIT);
 	dprintk("%s End (trypnfs:%d)\n", __func__, trypnfs);
 	return trypnfs;
 }
-- 
1.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux