Skip to content

Commit 6949493

Browse files
Trond Myklebustamschuma-ntap
authored andcommitted
NFSv4: Don't hold the layoutget locks across multiple RPC calls
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 <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 126966d commit 6949493

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
@@ -3098,6 +3098,10 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
30983098
}
30993099

31003100
out:
3101+
if (opendata->lgp) {
3102+
nfs4_lgopen_release(opendata->lgp);
3103+
opendata->lgp = NULL;
3104+
}
31013105
if (!opendata->cancelled)
31023106
nfs4_sequence_free_slot(&opendata->o_res.seq_res);
31033107
return ret;

0 commit comments

Comments
 (0)