Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2697559pxj; Mon, 31 May 2021 08:30:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjloAT+eDuYf/RJ6VmAIEbm8cUJKcT4sneKYsPt8kP8REcbvDmNztGWcRg2TJDcJ0PLlgK X-Received: by 2002:a05:6402:3548:: with SMTP id f8mr25656316edd.251.1622475032181; Mon, 31 May 2021 08:30:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622475032; cv=none; d=google.com; s=arc-20160816; b=ljxYLkBlw0KJOoIii6xAy2Iwkripav/7sjij9iISE7dZiKZStiXKW29emTS6IqcdQ0 cFlZkNgcHHKUS7JGP+eTrc7XgdlnY/GTPqOlL1AnxRFH+z6v2JpDTflICsRFkzgQmysh 9f497RtFKe/x2Z5CXB9Eib0sPC4UvFHhu3Doi5fuOwbmXBX9w19j7Vf5VBYxOXSTBHgQ s7/ai/pOfPNZB2pTDcKA1Ipyob+CLZXvUtwUEpOkUODxl7Z95/VFZBU4YoPvN4LkX1Hm l1I0STeuwLi/MUp5VPuVeR2Ys72mqwoNqHv1LZHx5FzDwN3i3syi+L7j57uwzw6BrwHy 1jjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LUlPzJYZjQfOebi9PYr7td2c/NOS9DToyAkUX3IsP8g=; b=cVL8jH0NOwqpdcpddiDvoL56C4qzzJ04qhcZNz5xCy1ZgPrWtp+dm5WljCkeYi1o9C LdaCgQkuEo601NItYKCszed3hA592MyWQeQif3m6I9V21qC04AITiVmLTyN+OWkoeBGe Ch4CPEX7oFexwwdR8Iwl+WIqJFvAEFvhGeOpZsRY8MluRrSgoUhfVE4xVCXxZ5jhp8zi wWGQ5blftLsU+2jhKybeLJgfYI9QsKVQ+2bgFcMhpz00YOoPN1Y2YeN8T7/yCq13j8yJ 9Y9JjnHazspvTktF9pcgsN8GFKnqQCpAXwFSWrpljfBWCqI89sWZhghZeMuM4tsy7myX escA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pqtkN9yG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h11si3449468edz.24.2021.05.31.08.30.09; Mon, 31 May 2021 08:30:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pqtkN9yG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233054AbhEaPaY (ORCPT + 99 others); Mon, 31 May 2021 11:30:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:43520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233096AbhEaORv (ORCPT ); Mon, 31 May 2021 10:17:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 741BB619AD; Mon, 31 May 2021 13:43:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468634; bh=z9tkXdkGHZYW3L/hJSHJ85y13emu4R6Xi41u2+p9kAE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pqtkN9yGl4S797GczttlG1O+Ik8X0kwcIUs3UiGTHTGpt0WNx+cy13pK8Dyf1cUEg vCzIwYrqlHI8Cl57jroY9x5gLL0hUOqbI+rP1V2Ix6cvouGXt/MBmdMtgutj4a+O0E STPjupna0S/UU3kS51tFRn3ZrAqHzJ34N1vtFPmU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, zhouchuangao , Trond Myklebust Subject: [PATCH 5.4 066/177] fs/nfs: Use fatal_signal_pending instead of signal_pending Date: Mon, 31 May 2021 15:13:43 +0200 Message-Id: <20210531130650.179734331@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130647.887605866@linuxfoundation.org> References: <20210531130647.887605866@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: zhouchuangao commit bb002388901151fe35b6697ab116f6ed0721a9ed upstream. We set the state of the current process to TASK_KILLABLE via prepare_to_wait(). Should we use fatal_signal_pending() to detect the signal here? Fixes: b4868b44c562 ("NFSv4: Wait for stateid updates after CLOSE/OPEN_DOWNGRADE") Signed-off-by: zhouchuangao Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- fs/nfs/nfs4proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1647,7 +1647,7 @@ static void nfs_set_open_stateid_locked( rcu_read_unlock(); trace_nfs4_open_stateid_update_wait(state->inode, stateid, 0); - if (!signal_pending(current)) { + if (!fatal_signal_pending(current)) { if (schedule_timeout(5*HZ) == 0) status = -EAGAIN; else @@ -3416,7 +3416,7 @@ static bool nfs4_refresh_open_old_statei write_sequnlock(&state->seqlock); trace_nfs4_close_stateid_update_wait(state->inode, dst, 0); - if (signal_pending(current)) + if (fatal_signal_pending(current)) status = -EINTR; else if (schedule_timeout(5*HZ) != 0)