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

Commit 67a3b721 authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker
Browse files

NFSv4.1/pnfs: Layout stateids start out as being invalid

parent bc23676c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1290,6 +1290,7 @@ alloc_init_layout_hdr(struct inode *ino,
	INIT_LIST_HEAD(&lo->plh_bulk_destroy);
	lo->plh_inode = ino;
	lo->plh_lc_cred = get_rpccred(ctx->cred);
	lo->plh_flags |= 1 << NFS_LAYOUT_INVALID_STID;
	return lo;
}

@@ -1565,8 +1566,7 @@ pnfs_update_layout(struct inode *ino,
	 * stateid, or it has been invalidated, then we must use the open
	 * stateid.
	 */
	if (lo->plh_stateid.seqid == 0 ||
	    test_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags)) {
	if (test_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags)) {

		/*
		 * The first layoutget for the file. Need to serialize per