From patchwork Thu Nov 30 21:53:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Busch X-Patchwork-Id: 13475111 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=meta.com header.i=@meta.com header.b="eQkaGhyQ" Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ECC810DC for ; Thu, 30 Nov 2023 13:53:16 -0800 (PST) Received: from pps.filterd (m0001303.ppops.net [127.0.0.1]) by m0001303.ppops.net (8.17.1.19/8.17.1.19) with ESMTP id 3AULXref019334 for ; Thu, 30 Nov 2023 13:53:15 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=s2048-2021-q4; bh=Gu7+KNmQ+XAgxD1FjreRoODLoAYKWRez/g+5c1+UaXA=; b=eQkaGhyQQOLyco7sBP/Cf340kzWk1WyszAHKyHGlSRXD3Q/s08WYUI7jmipMxxIGosP1 +hpu8VxQ4Ds2yzfwyKUpn4sN0KE0pQtsuCz0zbPEHu2jfwCG89GQVnW/oSi9bGWIHUcP hh6k1cPBCki+e0qdQSafqOz9ZsPTXSFccBYjWrozN350K3Qb/h9kkbvUOUYjrlGg1G7d FHAgTzG2GtHSOthMGG1kcmWKZGWVEh0Ed5veKccgXfyIzh+UQapE999bAsCLOot6OV2X AV5GNhNlfaC5YYTXnjSbF0NczH4jXij1PA6/5lnOuFQHt2ho8ZNxSF63dD4c3PtIJyMP ew== Received: from mail.thefacebook.com ([163.114.132.120]) by m0001303.ppops.net (PPS) with ESMTPS id 3upp2hnebm-19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 30 Nov 2023 13:53:15 -0800 Received: from twshared6844.02.ash8.facebook.com (2620:10d:c085:108::4) by mail.thefacebook.com (2620:10d:c085:11d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 30 Nov 2023 13:53:14 -0800 Received: by devbig007.nao1.facebook.com (Postfix, from userid 544533) id 884DD226BF68B; Thu, 30 Nov 2023 13:53:10 -0800 (PST) From: Keith Busch To: , , CC: , , , , , Keith Busch Subject: [PATCHv5 4/4] io_uring: remove uring_cmd cookie Date: Thu, 30 Nov 2023 13:53:09 -0800 Message-ID: <20231130215309.2923568-5-kbusch@meta.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231130215309.2923568-1-kbusch@meta.com> References: <20231130215309.2923568-1-kbusch@meta.com> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-FB-Internal: Safe X-Proofpoint-GUID: KGoTqQCCdL4I2M0kZDYaql4NU6uvWhzu X-Proofpoint-ORIG-GUID: KGoTqQCCdL4I2M0kZDYaql4NU6uvWhzu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-30_22,2023-11-30_01,2023-05-22_02 From: Keith Busch No more users of this field. Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Keith Busch --- include/linux/io_uring.h | 8 ++------ io_uring/uring_cmd.c | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/linux/io_uring.h b/include/linux/io_uring.h index fe23bf88f86fa..9e6ce6d4ab51f 100644 --- a/include/linux/io_uring.h +++ b/include/linux/io_uring.h @@ -32,12 +32,8 @@ enum io_uring_cmd_flags { struct io_uring_cmd { struct file *file; const struct io_uring_sqe *sqe; - union { - /* callback to defer completions to task context */ - void (*task_work_cb)(struct io_uring_cmd *cmd, unsigned); - /* used for polled completion */ - void *cookie; - }; + /* callback to defer completions to task context */ + void (*task_work_cb)(struct io_uring_cmd *cmd, unsigned); u32 cmd_op; u32 flags; u8 pdu[32]; /* available inline for free use */ diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c index acbc2924ecd21..b39ec25c36bc3 100644 --- a/io_uring/uring_cmd.c +++ b/io_uring/uring_cmd.c @@ -182,7 +182,6 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags) return -EOPNOTSUPP; issue_flags |= IO_URING_F_IOPOLL; req->iopoll_completed = 0; - WRITE_ONCE(ioucmd->cookie, NULL); } ret = file->f_op->uring_cmd(ioucmd, issue_flags);