Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2656645pxj; Mon, 31 May 2021 07:33:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDgOl+YBMuRPN+/8pVtkfVbihrkyIotyELR/tZih2NE3tsy9n1kYCe531VFUePLkanU8Qq X-Received: by 2002:a17:906:6ad0:: with SMTP id q16mr24000510ejs.286.1622471585170; Mon, 31 May 2021 07:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622471585; cv=none; d=google.com; s=arc-20160816; b=u8CxtkMl5pLDsuGd0wcD5TqEsdnsquV1WqBAySYvrQPsPAOSadYCNIvlhF+xneS2jt T+TbTBsqSwtAvtFwk7L6vMLDnLMaLKx88JQSAFxkSSX0UrN/WBN/TCA/lrA+dFRS6FT3 eLuPS/+hJa3Dg8qTwrM9WgYgb3tqnAz+Ekl+Q9fKzYj+5VWabbZRSWSIKXFjBfZejwhB wovgNhSfZbwrKa3DjKIXS7DazNLySCrFoADCo/YXXlrbAd+l+Xw4LvFWy2Urp9rNY0MY iU3rBO+xXT16ZcFqrQGkbrckRZklV2YCPp9i3irNq844bjbFIvb87hMrIf5kLvW6bmx8 OUvQ== 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=P3FR2niS1syju8bAlHeu80r48QYc0Q/T5gnS3cqwNK4=; b=O9n8yvIAHM7PIohB2hdfIUgiS6wgz0DjdflSKBtJc4vI+ewsgOx8ybygseAQEDhntw 708iiRtnLQMuzFE752P4p/7ncQDDxjI0n3H8W9YxZA/+oSiyE0kRjQ84Frp3DF++Qrp9 ZoqR4MALoWSUcio71XXDr/4E3ExotF+SvOMYcm2eZo3aw95AoBnjA13tWN++WGq4pRml IpgQInLGI3lJLg1VxWE9JaZzBQ8l/wG4c/TuHDt8ZEgBjWfXDoY1ZqrqFZLHyF2YSgsw cqN2OfBgRJBA2KFkhB4Nubt97L/zSZqSTzP/42aiMulPyQ21lRvpC94Ifv8rtdXeG1MV Y0Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=agcc7PuU; 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 j16si16510405edj.401.2021.05.31.07.32.42; Mon, 31 May 2021 07:33:05 -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=agcc7PuU; 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 S234073AbhEaOdG (ORCPT + 99 others); Mon, 31 May 2021 10:33:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:59374 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233180AbhEaNyt (ORCPT ); Mon, 31 May 2021 09:54:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 06CF8613F0; Mon, 31 May 2021 13:33:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468030; bh=h0leL4LZ00p1Dww/hrwEsCVuYcN1DOIeLraIJHIBU3E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=agcc7PuUR/KScRrP49L8ZZODALfZWeu5eG5Ap78mjosuhWNUYpHjXuksKwmo1QsEw klv9jIw8m5TTRBOIrHZ+CME7w6EHFOKXkSHujCuv2F2kQfYKaPHccbNrgPgfh4HBRp gtrshKzGGZ/A6QXhj4ZVMTH0Yqqg5NHMZVwQxjsU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, zhouchuangao , Trond Myklebust Subject: [PATCH 5.10 091/252] fs/nfs: Use fatal_signal_pending instead of signal_pending Date: Mon, 31 May 2021 15:12:36 +0200 Message-Id: <20210531130701.058058672@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@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 @@ -1688,7 +1688,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 @@ -3463,7 +3463,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)