]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/nfsv4.1-don-t-free-interrupted-slot-on-open.patch
5.0-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.19 / nfsv4.1-don-t-free-interrupted-slot-on-open.patch
1 From 0cb98abb5bd13b9a636bde603d952d722688b428 Mon Sep 17 00:00:00 2001
2 From: Olga Kornievskaia <kolga@netapp.com>
3 Date: Tue, 19 Mar 2019 12:12:13 -0400
4 Subject: NFSv4.1 don't free interrupted slot on open
5
6 From: Olga Kornievskaia <kolga@netapp.com>
7
8 commit 0cb98abb5bd13b9a636bde603d952d722688b428 upstream.
9
10 Allow the async rpc task for finish and update the open state if needed,
11 then free the slot. Otherwise, the async rpc unable to decode the reply.
12
13 Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
14 Fixes: ae55e59da0e4 ("pnfs: Don't release the sequence slot...")
15 Cc: stable@vger.kernel.org # v4.18+
16 Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18
19 ---
20 fs/nfs/nfs4proc.c | 3 ++-
21 1 file changed, 2 insertions(+), 1 deletion(-)
22
23 --- a/fs/nfs/nfs4proc.c
24 +++ b/fs/nfs/nfs4proc.c
25 @@ -2909,7 +2909,8 @@ static int _nfs4_open_and_get_state(stru
26 }
27
28 out:
29 - nfs4_sequence_free_slot(&opendata->o_res.seq_res);
30 + if (!opendata->cancelled)
31 + nfs4_sequence_free_slot(&opendata->o_res.seq_res);
32 return ret;
33 }
34