Skip to content

Commit

Permalink
NFSv4.1/pNFS: Use nfs4_stateid_copy for copying stateids
Browse files Browse the repository at this point in the history
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
Trond Myklebust committed Jan 4, 2016
1 parent ed429d6 commit 50f563e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ static void pnfs_layoutreturn_before_put_lseg(struct pnfs_layout_segment *lseg,
enum pnfs_iomode iomode;
bool send;

stateid = lo->plh_stateid;
nfs4_stateid_copy(&stateid, &lo->plh_stateid);
iomode = lo->plh_return_iomode;
send = pnfs_prepare_layoutreturn(lo);
spin_unlock(&inode->i_lock);
Expand Down Expand Up @@ -1007,7 +1007,7 @@ _pnfs_return_layout(struct inode *ino)
dprintk("NFS: %s no layout to return\n", __func__);
goto out;
}
stateid = nfsi->layout->plh_stateid;
nfs4_stateid_copy(&stateid, &nfsi->layout->plh_stateid);
/* Reference matched in nfs4_layoutreturn_release */
pnfs_get_layout_hdr(lo);
empty = list_empty(&lo->plh_segs);
Expand Down Expand Up @@ -1098,7 +1098,7 @@ bool pnfs_roc(struct inode *ino)
goto out_noroc;
}

stateid = lo->plh_stateid;
nfs4_stateid_copy(&stateid, &lo->plh_stateid);
/* always send layoutreturn if being marked so */
if (test_and_clear_bit(NFS_LAYOUT_RETURN_BEFORE_CLOSE,
&lo->plh_flags))
Expand Down

0 comments on commit 50f563e

Please sign in to comment.