From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 642F1C43381 for ; Mon, 1 Apr 2019 17:55:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2A59D2084B for ; Mon, 1 Apr 2019 17:55:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554141322; bh=16E1iSjjBz9IP9jB7Rv7AOXbHiJ957bknwStVe2ke8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=k4GkzECrJu4o79Np9LLNR7/jeafE4BvJTM77HwKZO+EuhdAI0Am27F5D4punNEMcX s3kyo1t7ZFwJiwG4UEQ4QjUwuPpCu2FDX67BDFZ3lPdBmgRmaIVtChQGzvfgmxyLBX av0K9B83liHc9oYhdq+Vl2lpjZmhnUVr2PfMKsjU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731418AbfDARXK (ORCPT ); Mon, 1 Apr 2019 13:23:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:52842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728728AbfDARXJ (ORCPT ); Mon, 1 Apr 2019 13:23:09 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 950ED206C0; Mon, 1 Apr 2019 17:23:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554139389; bh=16E1iSjjBz9IP9jB7Rv7AOXbHiJ957bknwStVe2ke8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ug6pB52AumqGbrmnCXp8eOLjEpgSF9YC3VAS7VfwgDlYMq8Mc3f5gqsvyXVcRVB7s Rir6E0V0BETnBER08JkTPPKN38Bsz04qO00GnDyaorKB9gzr7fcmQyWlk6/0pmAxzp d2CLvQyn50KevzammATE8FUhRp9aM+bXVBbZWlzU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Olga Kornievskaia , Trond Myklebust Subject: [PATCH 4.14 061/107] NFSv4.1 dont free interrupted slot on open Date: Mon, 1 Apr 2019 19:02:16 +0200 Message-Id: <20190401170051.262269728@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401170045.246405031@linuxfoundation.org> References: <20190401170045.246405031@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Olga Kornievskaia 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 Fixes: ae55e59da0e4 ("pnfs: Don't release the sequence slot...") Cc: stable@vger.kernel.org # v4.18+ Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- fs/nfs/nfs4proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -2746,7 +2746,8 @@ static int _nfs4_open_and_get_state(stru 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; }