From patchwork Mon Jan 20 01:28:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schubert X-Patchwork-Id: 13944636 Received: from outbound-ip191b.ess.barracuda.com (outbound-ip191b.ess.barracuda.com [209.222.82.124]) (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 C9A1F17BBF; Mon, 20 Jan 2025 01:29:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=209.222.82.124 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737336571; cv=fail; b=dwbQjcpyq3aHXGbN5wgMlhx8mq3v87h6HieFB0qfaVmzdZtI9AJXgUPWpefkcOY3jgCR8PN1c6hnlUf/wuUWpgpolxvqkrT7utZJI2f+WphykhZ9m3lT3ZivIKubFIXq4/c0NM3Eeuszu3wPDy/2JgAoyn2zbCDP8wDcAM5kA8c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737336571; c=relaxed/simple; bh=wxYO2fuIGkvqmeC9PNGhH5rOX2Wls8HlW08RzezL2Zw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FcJmjayDfBupWbGNB6C9pLtA0IZCiUu1OS90drvMAsJ23wTQ2pLP7t76dfkDIk/8EUHHsjoA+mwr/fJr61RwVzJsAL+FI5OqBWigCWMPpevKRCMprTLUf+MlUKCh07GO4/0BytEOkZMFbfuzl8tYxAL9TGOBSUf+PFnS1L5lcIA= 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=FxYoBaDX; arc=fail smtp.client-ip=209.222.82.124 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="FxYoBaDX" Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2043.outbound.protection.outlook.com [104.47.58.43]) by mx-outbound23-227.us-east-2b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 20 Jan 2025 01:29:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=K9qsWd2jf1+YX0gSOlz1VYwLYXF0Yg2NJTNPH4BiG+IWOE9xDwJ4hDOMxsrJA4DoGkV08smwDuO0Iy04t414DQEZBAhTCf3cIUxEfrqB4RIR6N4Oj2EXyHrGiooVGam2OWbo5UNlSP7KEYbATFPg244CjWQDSLPHpddckQHpcJB7vODhwbchztk6jH5DSQKSPpGViL6qdiBXM7ORPPp1xfqWwNJSCOdhXwlNivEJnTNTC7+YvO5Hra6a6cxk0nNP9EHSoTXPFRuHvE7kfB7vy/ttc5DEQCJ9OzhkPFgTXMWZeuyQ9cw6srir+JYmNwfCCEacPm4TLj2SE7zvBdDXMg== 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=hAgBjLWkV7oHdA35f4ET93Ocl3k2rLGZEn+8xfR4iOY=; b=UyRENuGBoZ5OB/Q/gThaVRbf1dq+F8gDQm77sKfBTswSF8AK2Nn0GM67PEf51QOykiDA7Xac5nFSO/LDJ1xfb7ewYwd7X+AXDRH4REkvic79CWasXQsCzXzrA50zGR+UtIlr9/5ePHcdg9WQbcwtQ1eHcddRm9G4oHf5qncfGE6haCjRirqwnHRoS14rqdVweDtwxidk9wt3PL+Xen/E6GFJ4J6OS8u/ermLByAzr3KPVqjb6BzAyv4BZaIJc1cRKXLN3Bb33XPT82PlO+TLTa8oarDSfURNg+2yLUj1OBJyp8tPwiRzEfTasQqlTAP+nzzJNvboyrDPH60fmZLkdQ== 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=hAgBjLWkV7oHdA35f4ET93Ocl3k2rLGZEn+8xfR4iOY=; b=FxYoBaDX+dciVY2H7ZNnhrkrQyUsnbgU/82fR3mlPDY9F9O3nrgEL06P1ErwWi3UScM1MMs90Zu88FQfL94gETwxvAyzHxTLc5vOZVTs0IAnp2qR7KayXVQgOqp0u6Iv6OI4hzUx45EowBy/AMeeFMXnivXRLVxO3em2j0GHdwQ= Received: from BN9PR03CA0876.namprd03.prod.outlook.com (2603:10b6:408:13c::11) by CO1PR19MB4981.namprd19.prod.outlook.com (2603:10b6:303:d5::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.20; Mon, 20 Jan 2025 01:29:05 +0000 Received: from BN3PEPF0000B074.namprd04.prod.outlook.com (2603:10b6:408:13c:cafe::b7) by BN9PR03CA0876.outlook.office365.com (2603:10b6:408:13c::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.17 via Frontend Transport; Mon, 20 Jan 2025 01:29:04 +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 BN3PEPF0000B074.mail.protection.outlook.com (10.167.243.119) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8377.8 via Frontend Transport; Mon, 20 Jan 2025 01:29:04 +0000 Received: from localhost (unknown [10.68.0.8]) by uww-mrp-01.datadirectnet.com (Postfix) with ESMTP id C3C4B34; Mon, 20 Jan 2025 01:29:03 +0000 (UTC) From: Bernd Schubert Date: Mon, 20 Jan 2025 02:28:55 +0100 Subject: [PATCH v10 02/17] 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: <20250120-fuse-uring-for-6-10-rfc4-v10-2-ca7c5d1007c0@ddn.com> References: <20250120-fuse-uring-for-6-10-rfc4-v10-0-ca7c5d1007c0@ddn.com> In-Reply-To: <20250120-fuse-uring-for-6-10-rfc4-v10-0-ca7c5d1007c0@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 , Bernd Schubert X-Mailer: b4 0.15-dev-2a633 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737336541; l=1631; i=bschubert@ddn.com; s=20240529; h=from:subject:message-id; bh=wxYO2fuIGkvqmeC9PNGhH5rOX2Wls8HlW08RzezL2Zw=; b=Lnz40p853xfFVldiMhE5s2BuVOY08WK61NAfyWpHGObnO0YrcLRshIjiub8/GjAow5kCMiWLw ZPg9iEagrdxBJWy8iFJh8PAf2ypwpHq9lsthXtrQ6v9jVedbzbNWac2 X-Developer-Key: i=bschubert@ddn.com; a=ed25519; pk=EZVU4bq64+flgoWFCVQoj0URAs3Urjno+1fIq9ZJx8Y= X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF0000B074:EE_|CO1PR19MB4981:EE_ X-MS-Office365-Filtering-Correlation-Id: c7c840da-bcb3-4647-7baf-08dd38f1d3c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?q?fbRs23EtW7kwMraww1v2ReWOuEKsPLy?= =?utf-8?q?nLMR+Lq78bfzTmbTOfxAkRuHWNycw9RTR9+U9VrtrOMfwCfrH7wPcS0/YlP3sCs38?= =?utf-8?q?A5aRThBpbMxCz+uNrKJgjHE82fIYzyZKyJopWpo2xt+cYxUM+03+tjTovkY/HY9ru?= =?utf-8?q?R3uvND70booJHG8nHNrc8qG6wrj2G3lguQ2dmGW25PUURr3Ck7LO+iTd6/VWt76M3?= =?utf-8?q?1dj4KtwlJm24Snuc1MNnA3IZC2FtCq6x5ZkwqoQyn//e1Rrp6TZFPjiSCACUIeyxw?= =?utf-8?q?N9hDwtd79txrfo5hAaNckEiIw51Ur1bqHhnCfJa/7TaOWYuU47gT1fMuPrBfXUKFt?= =?utf-8?q?cB3YerE5sseeu8/d4OQgyNlwhLoc+r5OSYyMtcNReE39NHj42H0jdEuThG8DxDRWL?= =?utf-8?q?6JUENdbix/qDFBDfJNHqpRdMatP6De+27oBH3t9mt1NtB2qGFc2PH2Fiwjen76iAD?= =?utf-8?q?345+ufYfwNoyknwPo0tV7dmvd4utEAEsZkHY9dSRb6gIHvgSODTZn1+MayV1hltVk?= =?utf-8?q?DP6fxhlx4Nzouhe121qk9S35TQVPPd4H1ocuwyM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ront-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)(1800799024)(376014)(7416014)(36860700013)(82310400026);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: xiV/8LbqKYVXOkTGDoxYiPHO6lejcL0IDkFLK/vj77VkytYrUaXb2QJU4C5iIEiG6/CetCPpP0XWk6d35pcOYHAC+OdLDOE8Ji3OV+Lt9DDiAuR7tedbvtt8xcVVPXU5VudMk2B2ajx3snNTsmwnIQEXSGKO4i09IkcZVOFyQI3gXyx6CbkkF49mDbaKv26BHK0gxnWLHt0Z2O2MZRrZGbIfmQBKMmDHn79LzydXzPeQoP+g0XHTO7XOfq4x6twGqO0ZPJna6pEjWGWhl4FjGEjKuxHpBcXgL0rtyFgiBA8/9CcWzCaNTiGp23o28byw2GeaFCaZbkkYN2txvBs9EISU4zEayW7tIsF6u3cGYWek5yd/HWuqC/k8QrniPUbX6/5tL9mQXj16OyyQDVFiqbA06emERwbjvwsO9oSrf7DHTkSe3xm3qWoVsIeeIAO4PYFKtHZ/4DUI3pz+CW/0c40lYSx77gYA/Gd5S/5DiVKruNtXIQ7qJ5RPJ/9sH90KNxMEQckAXZy6TlEuNDLLMthNPdTSbOxAyGwUDSKntHrTMdqDIFhlUGeLes5giUeStFmonjAjbBYXW5pZyRGek4ahGuQFgCwLwA/AKtJ1iHIOzXEIkUPvoYsATopnOC3E93XnaGYAbxOHm7l/yGwgnw== X-OriginatorOrg: ddn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2025 01:29:04.5953 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c7c840da-bcb3-4647-7baf-08dd38f1d3c0 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: BN3PEPF0000B074.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR19MB4981 X-BESS-ID: 1737336546-106115-13449-10989-1 X-BESS-VER: 2019.1_20250117.1903 X-BESS-Apparent-Source-IP: 104.47.58.43 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoam5hZAVgZQMDXNwsDEwMg0KT k5zcw81dDQxNgi2SLZ3CjVwsQw0chAqTYWAMycoyBBAAAA X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261928 [from cloudscan23-253.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 --- 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