Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2263609pxb; Thu, 11 Feb 2021 08:12:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHaQxI9dXHSl8uOYQL6cUXCtKHlKJ+kJhhCN5x5Ez99dXuolWkEenWvV0BjbmGd8yrV0+3 X-Received: by 2002:a05:6402:104e:: with SMTP id e14mr9193720edu.316.1613059953960; Thu, 11 Feb 2021 08:12:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613059953; cv=none; d=google.com; s=arc-20160816; b=TQ8cYKczERotZFb7JRVxyA/HxhHelVGv1xpqk2+VHPCwkD0UqJZVELuVaw8znAstSq K/xs8LDjWoW8qy3U9cfFbzS6jxKK38BjdizFh6Lr0bW6ApQjIchGbcCC6GgdH0C2F7X9 S8ujuX0IPyMRgOzlZ/JeZM1oJtqNey2jcXw2e/xsZbQo+PWLsdXkUmB9D7uuyDhNt0MC VKT+y/bTcDeSPv5fdXYkr2x3WICT7ThvaIMfs5p71MSwOKmSb0fGGVD6YFWyAMRWmXlr 7GvfwRIGfxs+5wSgzxHXN71KsgLtHUL/l4Uq6sEM4JImDlPAPd8PbYMDoQLSEG2K4G0b 23dg== 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=NYI+L8RZqfcj/LDe6df1uLSzr9d3HZL2GUth2PdLBMU=; b=KXrBT/Kw8fj8qGGHm9tHsYO9cZ1qsJXiB2AJOY2J9ql+SBWKMRIUXjPMNDFlBgzRWa UqRalFRPBCQR72OzeXkvboRVHOzYWv9Q4eglkbqOoKOUUGhOicsUtHPb+S95soVdp64I alQV1kmlZkl0PbsibuFzDJ5ygBpuHxz9cMZeRAZ6hhPZZx4flqtw65SUfWdxoSUy5KOZ mTjVNQ2BpW0eyobbraVUmG0P5wBNUBpwnz/6sZoWO9w1NHV56Epx7oC+EsZZb1qCzK1H /56Aktz6TINddwHFn+1KATDJA7NZtc9UK5/M0Th4oqK8wlh/lPy9qaO2D70yjh4JI4kF L0bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XK+UVqyw; 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 e17si4408647edz.241.2021.02.11.08.11.52; Thu, 11 Feb 2021 08:12:33 -0800 (PST) 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=XK+UVqyw; 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 S231752AbhBKQK7 (ORCPT + 99 others); Thu, 11 Feb 2021 11:10:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:48922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229997AbhBKPFN (ORCPT ); Thu, 11 Feb 2021 10:05:13 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A8AEA64DD8; Thu, 11 Feb 2021 15:03:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613055792; bh=Hou3EzeFGnnnBff3YIbD7vysuVQWFhpKzE/7+xwR/JM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XK+UVqywK0xA7PBMyonw7Jv8Uxx+ZJJJcrnH+1hIIxt3RuPgnY3NCjNIVkXjfIDm4 0s65otIwtYLMkIamzH7fXMOmYqXTKvS9myIIqX8VmHT2GDJJywD5dLeO5nRme4eF2m VWTsivGahaaee7eNUKjt+0+iFsEcUYrY7J3OA7i4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Jens Axboe , Pavel Begunkov Subject: [PATCH 5.10 01/54] io_uring: simplify io_task_match() Date: Thu, 11 Feb 2021 16:01:45 +0100 Message-Id: <20210211150152.950719198@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210211150152.885701259@linuxfoundation.org> References: <20210211150152.885701259@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore 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: Pavel Begunkov [ Upstream commit 06de5f5973c641c7ae033f133ecfaaf64fe633a6 ] If IORING_SETUP_SQPOLL is set all requests belong to the corresponding SQPOLL task, so skip task checking in that case and always match. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- fs/io_uring.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1472,11 +1472,7 @@ static bool io_task_match(struct io_kioc if (!tsk || req->task == tsk) return true; - if (ctx->flags & IORING_SETUP_SQPOLL) { - if (ctx->sq_data && req->task == ctx->sq_data->thread) - return true; - } - return false; + return (ctx->flags & IORING_SETUP_SQPOLL); } /*