Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp902788pxb; Fri, 22 Apr 2022 13:54:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyciguElSKwTdjayyaphY/OGJMTBfw3AbME5lrEcEI0lGWan7uul6AlP+FTCevrfhwGfoOF X-Received: by 2002:a17:902:d511:b0:159:65c:9055 with SMTP id b17-20020a170902d51100b00159065c9055mr6250331plg.38.1650660844095; Fri, 22 Apr 2022 13:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650660844; cv=none; d=google.com; s=arc-20160816; b=AyFW9O9op9yUoyHIXCGDWJWDIiLXCyr4AGRpqIIg9awu+Z54iV3dMTiE1/omZM1p8j 6bDM4kNCrhSRxB1ynmsa9NXR7Mzy475qgyAk0eDVvriyWplpZeS5Un8qN6OvD1Kx/9YU D/I2FqiVlX0YrUTicpxioD2S5GG/LSiwaswzq0Kb91LJc1jNn4xlGcfnY+m0hJAbFu0d IFlntQ7Q4O9dNS9x+Yd9IMFZF/JPFcgiDknrodAE670d2U6BEPkn1VTU6lmlpPqF5Yep cdjalMNPmEW5UQyBdkh1MUw8RX9Mw8DjahzX+rKVFIuKisPJq5Ik1OZJW4jGCWJPrTJh 7DWQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=o+BEJzHk53Z2SWPQnNBmJJX4g5pdl6FD6EzyM6ejeDU=; b=RPeNzy47KjUPhg5XXnY6iMK/4s2ojY09RpqJCOqINDre0cStPXYG6t7WeolMrCvlbV RkzTqSxBRSJnAiuuHvafefM3NwmeBNvfCAeRtZkv0gI/bAPq7lsXg6VQzlIrWSi+W7BM 6qKApIhNIcBoiMqPHUBF0HQgXo3Us9ebpkr+aNaj03dhrjXGI1S+H8RCRmkd7RMbtDeN 0vrbIrEJRuWorDXuFqTlV0mGGJZxXazx5eAf0LcA+7YWhUaDh2BcgFa1G2h6S0rqt2i+ HdHbdiQ78mwvlFuGO9YcbDam+gYs/zdI6ew1Oh90DsR1ixz6B1CHca8KUO0WaAu6SXFG 5bpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=FCTyzZzx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fb.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b24-20020a63eb58000000b0039d54720b7fsi8678513pgk.778.2022.04.22.13.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 13:54:04 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=FCTyzZzx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fb.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6693C313146; Fri, 22 Apr 2022 12:48:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387480AbiDUJUM (ORCPT + 99 others); Thu, 21 Apr 2022 05:20:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387212AbiDUJTv (ORCPT ); Thu, 21 Apr 2022 05:19:51 -0400 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 258C023BE0 for ; Thu, 21 Apr 2022 02:17:03 -0700 (PDT) Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 23L73eUt022788 for ; Thu, 21 Apr 2022 02:17:03 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=facebook; bh=o+BEJzHk53Z2SWPQnNBmJJX4g5pdl6FD6EzyM6ejeDU=; b=FCTyzZzxkRgUdu2CKkT1lqxM385q8rqANFfI2jCSJy1xA5kx568x83wPiHoDW2uUdRu8 e0pNL4XY/uIQIany6u78wOXzqJxoebmgu/aCCiEnIPUR9I0OoDacclvMDyhXPalqb+c4 iUp2ht/xgy7XqbQc4pshCQZ1y6Sdva/Caf8= Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3fjhgxy3q2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 21 Apr 2022 02:17:02 -0700 Received: from twshared41237.03.ash8.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:83::4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 21 Apr 2022 02:17:01 -0700 Received: by devbig039.lla1.facebook.com (Postfix, from userid 572232) id 19B7F7CA7604; Thu, 21 Apr 2022 02:14:02 -0700 (PDT) From: Dylan Yudaken To: CC: , , , , Dylan Yudaken Subject: [PATCH 6/6] io_uring: allow NOP opcode in IOPOLL mode Date: Thu, 21 Apr 2022 02:13:45 -0700 Message-ID: <20220421091345.2115755-7-dylany@fb.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220421091345.2115755-1-dylany@fb.com> References: <20220421091345.2115755-1-dylany@fb.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-ORIG-GUID: GKIBp6dQTQwht9uJfIwKe6ctwUQmaijC X-Proofpoint-GUID: GKIBp6dQTQwht9uJfIwKe6ctwUQmaijC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_06,2022-04-20_01,2022-02-23_01 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is useful for tests so that IOPOLL can be tested without requiring files. NOP is acceptable in IOPOLL as it always completes immediately. Signed-off-by: Dylan Yudaken --- fs/io_uring.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index e46dc67c917c..a4e42ba708b4 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -4526,11 +4526,6 @@ static int io_splice(struct io_kiocb *req, unsigne= d int issue_flags) */ static int io_nop(struct io_kiocb *req, unsigned int issue_flags) { - struct io_ring_ctx *ctx =3D req->ctx; - - if (unlikely(ctx->flags & IORING_SETUP_IOPOLL)) - return -EINVAL; - __io_req_complete(req, issue_flags, 0, 0); return 0; } --=20 2.30.2