From patchwork Thu Jan 23 14:51:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schubert X-Patchwork-Id: 13948332 Received: from outbound-ip168b.ess.barracuda.com (outbound-ip168b.ess.barracuda.com [209.222.82.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE66C20F971; Thu, 23 Jan 2025 14:51:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=209.222.82.102 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737643899; cv=fail; b=NZbT3iRGC53N2h2JfOHGKq4QK1E0tDtqoYhaXZ0HFwtzfLdolgwybff3gbgh5vMARuF3DxlmXuPfJ2XlkmNjgpjVh1KfHozWaXl0UZIYF2Sf5WMXUA0S9fpn0XCIM37G3nx8bcSwUMU82e1VflrlzWCxZz/tuvT9w3Xjisy4DlE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737643899; c=relaxed/simple; bh=QEaZV+eBHnnF2f6i8r0SZXk2gH5YESwBQ3rr/AP2eoU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=St0d/xLNkPWM4SVL8NlP3n4kGcI2b4Y11IliNoZbZHPt9tzj8i65sz1SuNHcWE2C5/U6ltDUxh7Xlop7UqV4tXeKd9g5ZqWTw3e7mZ/fCWUKxjsKMGikRoU7x+1NwLMAcTA81iRAAIhgcRYlHUXqQ7qujFiUFgD0EJQSonzCgLs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ddn.com; spf=pass smtp.mailfrom=ddn.com; dkim=pass (1024-bit key) header.d=ddn.com header.i=@ddn.com header.b=w9Gy6Gz6; arc=fail smtp.client-ip=209.222.82.102 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ddn.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ddn.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ddn.com header.i=@ddn.com header.b="w9Gy6Gz6" Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2049.outbound.protection.outlook.com [104.47.58.49]) by mx-outbound46-227.us-east-2c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 23 Jan 2025 14:51:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=p1Kjv9FiFqWNJgRtSnxNLlCu3ym9RXdAw1ZjSI/yofAjTy7pOpVAn2TA1oDUBZXXXTzn0KTSCxdHXOyLnGpZXhktOREfONcZlQL3MRz7Tylx2UCwj7yQKMO+jkKJnvR9iho3HrkvnB3ZQeU/+UI5Y7IngcP9t3zwI3yq9JYaZDExdAGcBgxYi0oI1vBhB18p63NJkO80OHF/SlIM34pM8mfDf8H2jTsAYUhpx1amy2v1Tkl1vuLFuOYyJmm4tQy5RyUrzb+eYQVZ00NC3S3kH3fHzIt8DaANjt5Tf51jPnS7zNkthxWStLnx3lC9mc+x1uThkJS+d3Udgm/1p5iIQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=A9Fhhg3KjX3KQ7/tQ1UUr2qA7J9WYDfKZqDSxfipFwI=; b=kS6gFMebrscGPOW8/4ajwbFe3XFJmgmLwXNFdqfwsv3ZFUnwZpJIiwpG9V186MD3kulP05K5vdJhniRTRuMOC5jF4ZdF+6dwp3RkNOOQUEJeiRqLkv+0gcIkdDQyW3cZFV+aACRClmjCluC1Up6nEXR9FF7hE5uXoyY3B6kMOxwJPOwFEmdXEirDd6e6KQgWmxj3W/x7veXB+7V+RM5m5GWgLHm4LmDmHZnofYudjNghZicvljsvwTPlVhKaHpHHKkP16hygTbHBB3fZC1LAi6nK5xW2V/L0GEK8cva5npnnPy/Ob2k5J9zHzAVC0FIQFoeudsGfHUj3d0mRiAWqAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 50.222.100.11) smtp.rcpttodomain=bsbernd.com smtp.mailfrom=ddn.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ddn.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddn.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A9Fhhg3KjX3KQ7/tQ1UUr2qA7J9WYDfKZqDSxfipFwI=; b=w9Gy6Gz6IM+Q1fQ7eDRV9NvSmRVh7NknL2Yrquk467WsQm64hL1iFlh42SwZ1ohadvuMXOy0Sd3Se/0BeDRnxjF5i+aeYZD4F9HOo/xIB2WTZBJ2MHvxTmb/h9SPpNL4Jazxw+xyNbgPcbkp0bRUo298jEI85GWnUYvkg11NfGo= Received: from BY5PR20CA0003.namprd20.prod.outlook.com (2603:10b6:a03:1f4::16) by CH2PR19MB4085.namprd19.prod.outlook.com (2603:10b6:610:9e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8377.16; Thu, 23 Jan 2025 14:51:15 +0000 Received: from CY4PEPF0000EDD1.namprd03.prod.outlook.com (2603:10b6:a03:1f4:cafe::16) by BY5PR20CA0003.outlook.office365.com (2603:10b6:a03:1f4::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8377.14 via Frontend Transport; Thu, 23 Jan 2025 14:51:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 50.222.100.11) smtp.mailfrom=ddn.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ddn.com; Received-SPF: Pass (protection.outlook.com: domain of ddn.com designates 50.222.100.11 as permitted sender) receiver=protection.outlook.com; client-ip=50.222.100.11; helo=uww-mrp-01.datadirectnet.com; pr=C Received: from uww-mrp-01.datadirectnet.com (50.222.100.11) by CY4PEPF0000EDD1.mail.protection.outlook.com (10.167.241.197) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8377.8 via Frontend Transport; Thu, 23 Jan 2025 14:51:14 +0000 Received: from localhost (unknown [10.68.0.8]) by uww-mrp-01.datadirectnet.com (Postfix) with ESMTP id 23FC334; Thu, 23 Jan 2025 14:51:14 +0000 (UTC) From: Bernd Schubert Date: Thu, 23 Jan 2025 15:51:01 +0100 Subject: [PATCH v11 02/18] fuse: Move fuse_get_dev to header file Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250123-fuse-uring-for-6-10-rfc4-v11-2-11e9cecf4cfb@ddn.com> References: <20250123-fuse-uring-for-6-10-rfc4-v11-0-11e9cecf4cfb@ddn.com> In-Reply-To: <20250123-fuse-uring-for-6-10-rfc4-v11-0-11e9cecf4cfb@ddn.com> To: Miklos Szeredi Cc: Jens Axboe , Pavel Begunkov , linux-fsdevel@vger.kernel.org, io-uring@vger.kernel.org, Joanne Koong , Josef Bacik , Amir Goldstein , Ming Lei , David Wei , bernd@bsbernd.com, Luis Henriques , Dan Carpenter , Bernd Schubert , Miklos Szeredi X-Mailer: b4 0.15-dev-2a633 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737643871; l=1684; i=bschubert@ddn.com; s=20240529; h=from:subject:message-id; bh=QEaZV+eBHnnF2f6i8r0SZXk2gH5YESwBQ3rr/AP2eoU=; b=ra+ywbmHSXpKCZ5v+K+DRqOJ2PGbuBmSQ//Q2veMaT4z8lIXxOzVATYpjXK3JpL9tgauGf9Iq zw+AYwHOwLxBJGatqdW3/OE6doRoMSkpzmem4I4RWnoOe9Ey2L3SmXD X-Developer-Key: i=bschubert@ddn.com; a=ed25519; pk=EZVU4bq64+flgoWFCVQoj0URAs3Urjno+1fIq9ZJx8Y= X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD1:EE_|CH2PR19MB4085:EE_ X-MS-Office365-Filtering-Correlation-Id: b8b2e787-7530-48ad-e515-08dd3bbd62bf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|36860700013|7416014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?j3oBA2z6BhqL2hPi2GyEWAPAL9zIxAC?= =?utf-8?q?uNaNFKklps68M6ZKcxQhcAOx2hA5ROPmERV/HuHISEkx05KZikKvhFmKYRNYRT/mB?= =?utf-8?q?NRSE2PiVcWHy7CmAkq0poJ913kMukZy+S2Z2wOlV3maYYpwv0S60jAZ+QmAx+z935?= =?utf-8?q?xwej6dDVxNK9+PSWsLpl0WuZHGuIMACi7mGjtCyvOz58leaMYlvNSC1alnD072Z58?= =?utf-8?q?Hdn2lzioeWSGUP+6X0Q57upVNX88DqZWcGs9AGGVKUamjBhprLYbxwv9f4PTK8dBo?= =?utf-8?q?TqhZ28z+4tDfLTUyitVVqm3FVgIKLc2cZUOasGkPAXFuJUcr/sAoYnjgj8AiO++rq?= =?utf-8?q?zFChLf6yyda+9aXsq4cV/DD3NS5M9xhQ8PeG6qf2pv4Ch4b+hiGC0RzUgrrPqv2aP?= =?utf-8?q?yeZYeosLKuTWdYlo4IVy8A7d4UKbjcHgOFK+cJrXg2DyZH46MiJvVUFiyHmUZIOIC?= =?utf-8?q?6qRtyuvSkFc47q8Ve9M7UPFbXZgteylkgaTQi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+hvICRfhNnWLq010Z94/TOn5xK2ofz?= =?utf-8?q?IfNm3pUZ71R6TT6x8iF09K0zRR+8fKu6IPoNpmHRoi3yTp+hXCybTY=3D?= X-Forefront-Antispam-Report: CIP:50.222.100.11;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:uww-mrp-01.datadirectnet.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(376014)(36860700013)(7416014)(1800799024);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: JeCKUVJFjp4vgsOFL5GNgN52n4zlE+rK0IIMpnALMPyXVttz8dyN+aIf9M+s9xH0XJdfUIv/QyAlacWctn4iG/OqMS+6DkJNAgjLLqcxuhjg5QSeM3LArG1If1lfXyXUNW2/iJfyZl24OUZusrfAS2fOKByMhZHNyyAvVjXYOhNuKdkx16kbYVNZv7mJa92JGMuZZHB+USmYq4tDKCgWWz0SfvX33zO85wpH/dCijcQxRFX7KHGVXYSsHusuCEYG7OHceEKGgTqKAXP/uHz0JxnLrafXHLIrwDHjDd1qhzb6pe/6XLvbuGpAl0gxwBVxxmCrOS1ghR0OdDmPQoQh7OlrnxlmeneMBAZOdmHFq1iO6lG6kIPI8iOZ1k3LNgMm4WQg/q2V1xv1pS9GmxlGwsfac4PiVLlfXk7lGdrziBzhurOYLgs4QgI/8FKlGi+QNs7VbEy7vniUlubESwQShzRjkFE7aQBqh2xbcHSyS7/d2mPfQGPNLHbrtv/CRvtfEYQifoezntFNPmWGzk9e7pp8o0X2frQTw5/50tgy1NN7mDlQGG+4m1Y4MD4RAV8WqkusLZxu9xG/ZJ5Sp5bSMvm0M8vAhfCh6s/D6cXq6oGB+ZmxfEPaZ2xvwTCZD/9PEuSz+J7udfMmROiIJ1Zddw== X-OriginatorOrg: ddn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2025 14:51:14.7298 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b8b2e787-7530-48ad-e515-08dd3bbd62bf X-MS-Exchange-CrossTenant-Id: 753b6e26-6fd3-43e6-8248-3f1735d59bb4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=753b6e26-6fd3-43e6-8248-3f1735d59bb4;Ip=[50.222.100.11];Helo=[uww-mrp-01.datadirectnet.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EDD1.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR19MB4085 X-BESS-ID: 1737643879-112003-13396-6293-1 X-BESS-VER: 2019.1_20250122.1822 X-BESS-Apparent-Source-IP: 104.47.58.49 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoZmxgZAVgZQ0CAx2cjMOMUkzT LRMsnEwtIo0TTRPNnY1DAlJTUpxdxYqTYWAAIpvRZBAAAA X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.262003 [from cloudscan18-30.us-east-2b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.50 using account:ESS124931 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 Another preparation patch, as this function will be needed by fuse/dev.c and fuse/dev_uring.c. Signed-off-by: Bernd Schubert Reviewed-by: Josef Bacik Reviewed-by: Joanne Koong Signed-off-by: Miklos Szeredi --- fs/fuse/dev.c | 9 --------- fs/fuse/fuse_dev_i.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 757f2c797d68aa217c0e120f6f16e4a24808ecae..3db3282bdac4613788ec8d6d29bfc56241086609 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -35,15 +35,6 @@ MODULE_ALIAS("devname:fuse"); static struct kmem_cache *fuse_req_cachep; -static struct fuse_dev *fuse_get_dev(struct file *file) -{ - /* - * Lockless access is OK, because file->private data is set - * once during mount and is valid until the file is released. - */ - return READ_ONCE(file->private_data); -} - static void fuse_request_init(struct fuse_mount *fm, struct fuse_req *req) { INIT_LIST_HEAD(&req->list); diff --git a/fs/fuse/fuse_dev_i.h b/fs/fuse/fuse_dev_i.h index 4fcff2223fa60fbfb844a3f8e1252a523c4c01af..e7ea1b21c18204335c52406de5291f0c47d654f5 100644 --- a/fs/fuse/fuse_dev_i.h +++ b/fs/fuse/fuse_dev_i.h @@ -8,6 +8,15 @@ #include +static inline struct fuse_dev *fuse_get_dev(struct file *file) +{ + /* + * Lockless access is OK, because file->private data is set + * once during mount and is valid until the file is released. + */ + return READ_ONCE(file->private_data); +} + void fuse_dev_end_requests(struct list_head *head); #endif