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

Commit e8fa33a6 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFSv4/pnfs: Fix an infinite layoutget loop



Since we can now use a lock stateid or a delegation stateid, that
differs from the context stateid, we need to change the test in
nfs4_layoutget_handle_exception() to take this into account.

This fixes an infinite layoutget loop in the NFS client whereby
it keeps retrying the initial layoutget using the same broken
stateid.

Fixes: 70d2f7b1 ("pNFS: Use the standard I/O stateid when...")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 0a47df11
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -8399,8 +8399,7 @@ nfs4_layoutget_handle_exception(struct rpc_task *task,
		lo = NFS_I(inode)->layout;
		/* If the open stateid was bad, then recover it. */
		if (!lo || test_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags) ||
		    nfs4_stateid_match_other(&lgp->args.stateid,
					&lgp->args.ctx->state->stateid)) {
		    !nfs4_stateid_match_other(&lgp->args.stateid, &lo->plh_stateid)) {
			spin_unlock(&inode->i_lock);
			exception->state = lgp->args.ctx->state;
			exception->stateid = &lgp->args.stateid;