mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 23:25:07 +00:00
pnfs: Don't release the sequence slot until we've processed layoutget on open
[ Upstream commit ae55e59da0
]
If the server recalls the layout that was just handed out, we risk hitting
a race as described in RFC5661 Section 2.10.6.3 unless we ensure that we
release the sequence slot after processing the LAYOUTGET operation that
was sent as part of the OPEN compound.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
20fc8b34c1
commit
1339e2b8ea
1 changed files with 2 additions and 1 deletions
|
@ -2695,7 +2695,7 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
|
|||
if (ret != 0)
|
||||
goto out;
|
||||
|
||||
state = nfs4_opendata_to_nfs4_state(opendata);
|
||||
state = _nfs4_opendata_to_nfs4_state(opendata);
|
||||
ret = PTR_ERR(state);
|
||||
if (IS_ERR(state))
|
||||
goto out;
|
||||
|
@ -2731,6 +2731,7 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
|
|||
nfs4_schedule_stateid_recovery(server, state);
|
||||
}
|
||||
out:
|
||||
nfs4_sequence_free_slot(&opendata->o_res.seq_res);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue