mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 01:04:19 +08:00
NFSv4: Don't hold the layoutget locks across multiple RPC calls
[ Upstream commit 6949493884
]
When doing layoutget as part of the open() compound, we have to be
careful to release the layout locks before we can call any further RPC
calls, such as setattr(). The reason is that those calls could trigger
a recall, which could deadlock.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
7b5488f472
commit
d4c2a041ed
@ -3108,6 +3108,10 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
|
||||
}
|
||||
|
||||
out:
|
||||
if (opendata->lgp) {
|
||||
nfs4_lgopen_release(opendata->lgp);
|
||||
opendata->lgp = NULL;
|
||||
}
|
||||
if (!opendata->cancelled)
|
||||
nfs4_sequence_free_slot(&opendata->o_res.seq_res);
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user