Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2730467pxj; Mon, 31 May 2021 09:17:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEieFOmx1IjwXvvSw8gis/yNkeKC+APBcqokFpCNNCOgMGecGGnq+HqZvwee1JK45QcUnY X-Received: by 2002:a05:6638:44b:: with SMTP id r11mr21277540jap.85.1622477838149; Mon, 31 May 2021 09:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622477838; cv=none; d=google.com; s=arc-20160816; b=M+0UrK9epbZxB1pmLXNNkijKb65t77XmYH8+SQQolyKIc48oJdExtfUhwslPUoyqZA 6WJeU7xOEwNxpbBxIYifyoBKF8uvWS1uwth0UdTPupY1zhbvrCP5rx2q935IENYGp85M q0MN4e6ydMiDIxGxOYkIf9cbd+JgV3h2tYTpattAPL9P9svH/2Hx3pnELgZsw/0Dkv27 1LYFVSv7g3y5O4r9ndpO7ThA/a++2g/m2cBgYKbLxfdU2HDgVAatvn2AEOEidtvUzW1z Zl3bduEDD6s6J2iiAz/6k9i0fnVm3k509QxRveNVRPgnshum6CSG6hvAvs6IoIa8VW7o vbJQ== 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=YSuIfVY0eYmZrvgA1BEvRqvF+0+KRKg/3RJKWXVUQPc=; b=vGmyUARUi+pkH9Qdq6Oo2DFqhYFpssUIiDiuaa5fcM/R90k23XLJLumDYppVemqz8J uzt1FtW3S8xl8buyXkE1tIrvg9Viil6Q6ihHIXMCwDCvSOBC9l+KUuU6keKEOa7ARO8Y QLeqK6EvT24CbQcS2QabeEWXCKq2ToA/aC+tUhRLdOOBag1T13ZFQb1yKtrfw6iuYK1I A9uzhPlDcnTkACd6CBLfvYYkzkaZM6z+y/t/RrlxHGRG1AsyPXCBqlRTu7v48VL5fRbg atQnishTrSQsTedSAWL6HQfKcDrC0aFk6+HrFrNbTKvVA3hQox4Lqten0Gu0CJCfDE5B ryIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sELenWbB; 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 j5si13400947ilr.135.2021.05.31.09.17.04; Mon, 31 May 2021 09:17:18 -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=sELenWbB; 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 S233385AbhEaQSC (ORCPT + 99 others); Mon, 31 May 2021 12:18:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:37968 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233606AbhEaOlc (ORCPT ); Mon, 31 May 2021 10:41:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 99DD961C73; Mon, 31 May 2021 13:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622469212; bh=NmajkwAUErgh7ORHx1VP5JA7EmeSO4Cym94XZ5/sbXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sELenWbBdJvtwEq/yBb4hLjiagsvVwnLp6Rg/lqho/HSnRc2PkDz9u1SRQikhOxlY QgA3FIbJ7ZcT6kP5uicU9+10Zo1NJu9G8tm9U3/ATAoZQnR05znSTUFN/blvqUOonB jcyRhEslKeqqXx213Wc1j+ufxAYEy+BfkkX6pP38= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, zhouchuangao , Trond Myklebust Subject: [PATCH 5.12 112/296] fs/nfs: Use fatal_signal_pending instead of signal_pending Date: Mon, 31 May 2021 15:12:47 +0200 Message-Id: <20210531130707.696742094@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130703.762129381@linuxfoundation.org> References: <20210531130703.762129381@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 @@ -1682,7 +1682,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 @@ -3458,7 +3458,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)