aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-01-04 12:22:46 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-01-04 12:36:10 -0500
commit50f563ef5d418127a75ca9b7116232672bbd8aaf (patch)
treeb45df48a042e98d5976190deeb7b20139823e3da
parented429d6b934d44e25f23f8102375a103c6fc3996 (diff)
NFSv4.1/pNFS: Use nfs4_stateid_copy for copying stateids
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
-rw-r--r--fs/nfs/pnfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 7a452895169f..7e0f2b9a9b10 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -385,7 +385,7 @@ static void pnfs_layoutreturn_before_put_lseg(struct pnfs_layout_segment *lseg,
385 enum pnfs_iomode iomode; 385 enum pnfs_iomode iomode;
386 bool send; 386 bool send;
387 387
388 stateid = lo->plh_stateid; 388 nfs4_stateid_copy(&stateid, &lo->plh_stateid);
389 iomode = lo->plh_return_iomode; 389 iomode = lo->plh_return_iomode;
390 send = pnfs_prepare_layoutreturn(lo); 390 send = pnfs_prepare_layoutreturn(lo);
391 spin_unlock(&inode->i_lock); 391 spin_unlock(&inode->i_lock);
@@ -1007,7 +1007,7 @@ _pnfs_return_layout(struct inode *ino)
1007 dprintk("NFS: %s no layout to return\n", __func__); 1007 dprintk("NFS: %s no layout to return\n", __func__);
1008 goto out; 1008 goto out;
1009 } 1009 }
1010 stateid = nfsi->layout->plh_stateid; 1010 nfs4_stateid_copy(&stateid, &nfsi->layout->plh_stateid);
1011 /* Reference matched in nfs4_layoutreturn_release */ 1011 /* Reference matched in nfs4_layoutreturn_release */
1012 pnfs_get_layout_hdr(lo); 1012 pnfs_get_layout_hdr(lo);
1013 empty = list_empty(&lo->plh_segs); 1013 empty = list_empty(&lo->plh_segs);
@@ -1098,7 +1098,7 @@ bool pnfs_roc(struct inode *ino)
1098 goto out_noroc; 1098 goto out_noroc;
1099 } 1099 }
1100 1100
1101 stateid = lo->plh_stateid; 1101 nfs4_stateid_copy(&stateid, &lo->plh_stateid);
1102 /* always send layoutreturn if being marked so */ 1102 /* always send layoutreturn if being marked so */
1103 if (test_and_clear_bit(NFS_LAYOUT_RETURN_BEFORE_CLOSE, 1103 if (test_and_clear_bit(NFS_LAYOUT_RETURN_BEFORE_CLOSE,
1104 &lo->plh_flags)) 1104 &lo->plh_flags))