Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13bede18 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

pNFS: Always update the layout stateid if NFS_LAYOUT_INVALID_STID is set



If the layout stateid is invalid, then pnfs_set_layout_stateid() must
always initialise it.

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 8e0acf90
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -762,7 +762,7 @@ pnfs_set_layout_stateid(struct pnfs_layout_hdr *lo, const nfs4_stateid *new,
			bool update_barrier)
{
	u32 oldseq, newseq, new_barrier;
	int empty = list_empty(&lo->plh_segs);
	bool empty = !pnfs_layout_is_valid(lo);

	oldseq = be32_to_cpu(lo->plh_stateid.seqid);
	newseq = be32_to_cpu(new->seqid);