Skip to content

Commit a4afe03

Browse files
committed
NFSv4: Don't hold the layoutget locks across multiple RPC calls
jira LE-3201 Rebuild_History Non-Buildable kernel-rt-4.18.0-553.22.1.rt7.363.el8_10 commit-author Trond Myklebust <trond.myklebust@hammerspace.com> commit 6949493 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> (cherry picked from commit 6949493) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 7abe14b commit a4afe03

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/nfs/nfs4proc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3117,6 +3117,10 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
31173117
}
31183118

31193119
out:
3120+
if (opendata->lgp) {
3121+
nfs4_lgopen_release(opendata->lgp);
3122+
opendata->lgp = NULL;
3123+
}
31203124
if (!opendata->cancelled)
31213125
nfs4_sequence_free_slot(&opendata->o_res.seq_res);
31223126
return ret;

0 commit comments

Comments
 (0)