summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorOlga Kornievskaia <kolga@netapp.com>2019-03-19 19:12:13 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-03 07:24:16 +0300
commit22a8711fa5aa63ff9e848c47299311f8c64c9955 (patch)
tree2c751326a8c2e35329de12df91c16a8a86c170e9 /fs/nfs
parent91f81cb5c58368d47b1a508c3a11825c70a6f1ba (diff)
downloadlinux-22a8711fa5aa63ff9e848c47299311f8c64c9955.tar.xz
NFSv4.1 don't free interrupted slot on open
commit 0cb98abb5bd13b9a636bde603d952d722688b428 upstream. Allow the async rpc task for finish and update the open state if needed, then free the slot. Otherwise, the async rpc unable to decode the reply. Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Fixes: ae55e59da0e4 ("pnfs: Don't release the sequence slot...") Cc: stable@vger.kernel.org # v4.18+ Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index eb55ab6930b5..6d0d94fc243d 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2748,7 +2748,8 @@ 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);
+ if (!opendata->cancelled)
+ nfs4_sequence_free_slot(&opendata->o_res.seq_res);
return ret;
}