Message ID | 20240125-flsplit-v2-16-7485322b62c7@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-38429-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp1553338dyi; Thu, 25 Jan 2024 02:53:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5ft7MDmRhXGsQj8JnKiDI9k6JB6ZGvTP6qN4g3KQ6mezQ3UAnL0z2ixGF/ceKymZ5r7u4 X-Received: by 2002:a2e:9b88:0:b0:2cc:87d7:a8e7 with SMTP id z8-20020a2e9b88000000b002cc87d7a8e7mr596363lji.102.1706180023937; Thu, 25 Jan 2024 02:53:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706180023; cv=pass; d=google.com; s=arc-20160816; b=VB4lBb4kn9c9y5MMMFZYjhjlEkTUTRoFD8G3nflGQ4BwNyNI+9fOwqCY44wp3OiKRw 2SGRbplex89bFKkEnAEDyuBPWSgpLdKi50lgzF+A8mz2HJBdEDXdKy97x7GQS7El79IF C/j2Lbb445cRZzvqypMesRuog5MEdd/D4K+OVbJcHI8g6bYCs4LEeaNb6TuPeq6zaY9v YZG0BhGADdBrwP5ZoSaqSYuN9MX0ExlaTfxpnIHX5sfJFKp/v4yd6iBiZVc/kFu6mN5W h/kwjuD6+b1UXvOpL3be0Dgbws0XErN3D9ga+YRlr6YU/yiNRlQh9f6YhWdBNEtVtTvM qJOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=Ct74MacfO/Bos+TKq2qlRbxKw0kUSbMr7eZqY9oiTE4=; fh=AED2lrIQZhdppGHbaRrNz6/BI48B+mbutB2egpFPmJc=; b=O1ZGmBc8D9HF1KHhoNxT7rEMthspEmeBXnN3XKqfVIZNH+/RrrUp8zVSKjw+n93t4w wL4W1rwEfrEgWvhTyCbXdKqPIZBsPETXzzApW6BHWRwoXuGqIRLrkCaOPc5do6goe7mX 21oMtxOJ0XkP/9Q1Ax5qc0eVqn5u1+QqP8OzRf9cwTbRRl0wQ8Qz18Vr3HNz/wyt7C+X vVnB5Kzwel0KNkGxZ72P9dmIqensLGqd168SWXmJ1sYFGDCjiXu5ykgIWzRKq3j0uvTJ xhKJFV65bo5iIu5nqUhl1RFwPv9FV+XJUyzVZz9EcBBkzWXzRSwZr2BjiJY6CjjL4Y1z 9u7A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W4Ih6SnA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-38429-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38429-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z40-20020a509e2b000000b0055a5d326181si7028516ede.674.2024.01.25.02.53.43 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 02:53:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-38429-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W4Ih6SnA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-38429-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38429-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7DD331F21130 for <ouuuleilei@gmail.com>; Thu, 25 Jan 2024 10:53:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51F81604B8; Thu, 25 Jan 2024 10:44:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="W4Ih6SnA" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 853176024A; Thu, 25 Jan 2024 10:44:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706179456; cv=none; b=kUKYxaVPLbJdqF73ZIAXC44WiJqzwcXlgj2gGByRClXzrSGMl5D8MmCtd9kQKDomfgdCdeqqS7QElNM0zDX1Cehu+uODcUyNbT73f4IFDDDBSMHy9L8rVZmZ/55bW3Fwe6UIMtkXeZX2OcpY/xkpzxy1P0Orgu5KzP0gwiuVh40= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706179456; c=relaxed/simple; bh=xSVfPHaguydEBPpPQLuNdFuo/APap+U5zYROxyDf4gM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Gx0k9yW6XZgvJQTYzBzALDyaYGzC8L0pRtwGVKsoOsKn4sORkYB5lAhxds0Fh/TUHjm/Qcx9PiWUu6bH/326WGGyVY+eEQyEnpy+YRG3+C++o79SGlgrIPKuFpOZ7al9j3ftmDNYOo+Q1/mXgRNSToWGohXR/LdsYANmT0mDNo0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=W4Ih6SnA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C30A9C433C7; Thu, 25 Jan 2024 10:44:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706179456; bh=xSVfPHaguydEBPpPQLuNdFuo/APap+U5zYROxyDf4gM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=W4Ih6SnAyrmlL/pbQq+dSbWolzHvXP3cFj8zyzzuSPNDYq2GQJrkhnBV+NaTUBZQH h3Wf/hISbHwISlUm6TOkbEraC0blxZ/7s+aBeUQOVA6jU+YPFh2GnrG1LPhpnjdG7p yh0Vd9sOUVwLo0MWI+pST/9C9USADJdsr7jH7sqNHKZY34XOHqUr0rjuBVrxnbenx5 Vaa0oDCjelWWsesqrn4Rb5OUNcp+4eLwwqviC6KRTZ2OeX3DfaCmM0WgIZEyGjLdgz amHUq7miwssXF9D+VUL4OkUG5A10nJHIKQ9k7tcHreHKYNIiNBTEljhsxWp8O8NaZC JwcFGmjc2HDQg== From: Jeff Layton <jlayton@kernel.org> Date: Thu, 25 Jan 2024 05:42:57 -0500 Subject: [PATCH v2 16/41] filelock: convert posix_owner_key to take file_lock_core arg Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240125-flsplit-v2-16-7485322b62c7@kernel.org> References: <20240125-flsplit-v2-0-7485322b62c7@kernel.org> In-Reply-To: <20240125-flsplit-v2-0-7485322b62c7@kernel.org> To: Christian Brauner <brauner@kernel.org>, Alexander Viro <viro@zeniv.linux.org.uk>, Eric Van Hensbergen <ericvh@kernel.org>, Latchesar Ionkov <lucho@ionkov.net>, Dominique Martinet <asmadeus@codewreck.org>, Christian Schoenebeck <linux_oss@crudebyte.com>, David Howells <dhowells@redhat.com>, Marc Dionne <marc.dionne@auristor.com>, Xiubo Li <xiubli@redhat.com>, Ilya Dryomov <idryomov@gmail.com>, Alexander Aring <aahringo@redhat.com>, David Teigland <teigland@redhat.com>, Miklos Szeredi <miklos@szeredi.hu>, Andreas Gruenbacher <agruenba@redhat.com>, Trond Myklebust <trond.myklebust@hammerspace.com>, Anna Schumaker <anna@kernel.org>, Chuck Lever <chuck.lever@oracle.com>, Neil Brown <neilb@suse.de>, Olga Kornievskaia <kolga@netapp.com>, Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>, Jan Kara <jack@suse.cz>, Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>, Joseph Qi <joseph.qi@linux.alibaba.com>, Steve French <sfrench@samba.org>, Paulo Alcantara <pc@manguebit.com>, Shyam Prasad N <sprasad@microsoft.com>, Namjae Jeon <linkinjeon@kernel.org>, Sergey Senozhatsky <senozhatsky@chromium.org>, Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@kernel.org>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: linux-kernel@vger.kernel.org, v9fs@lists.linux.dev, linux-afs@lists.infradead.org, ceph-devel@vger.kernel.org, gfs2@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, ocfs2-devel@lists.linux.dev, linux-cifs@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Jeff Layton <jlayton@kernel.org> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1528; i=jlayton@kernel.org; h=from:subject:message-id; bh=xSVfPHaguydEBPpPQLuNdFuo/APap+U5zYROxyDf4gM=; b=owEBbQKS/ZANAwAIAQAOaEEZVoIVAcsmYgBlsjs7kqDnVp6EIWs+kAfd7OL//ENkspIJLKDt3 pgw/e/sksmJAjMEAAEIAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCZbI7OwAKCRAADmhBGVaC Fa02D/sGkJvM0+1Gyqi9Ahb0gvaTr36ipvatPN8+hUBWAXsoQZcjQxmC+JnWo1I3LWtN2+B4F+x cXSFkYnNbCoo1IcNGi0rNpF6t5pfIfvjWI8K9b5PBgCErLUxwx+eiASCliblkPDkyDzn09w/aOZ 3Mm5YH9A2OdKFlhcxg2qebsKYrRuXJ+kQJCOQIcXI4S3/RppUctxnP5UHwzHlQU2WgjbYZgq+7F nwanSumVKmXsQ6oYIji10GDmY7drFXM9OXjobNwbfp6qSQ42ggNa4UweNy5ilTI35ZxVbVU20T/ FOnbo10FdAxehOnK0/a4kC6fiKmCgCSn2HZm/skxGegjdhwsxT6DicpgJrvJ/gY137A85PM+Ksh 050Jo4sJMagHZRiafNZMutlGOH3jZkKsk5PulPWRewnf6H6r4YGZnLeIg+we1p0BQDy3kCH+LSG s22oa43pKd5WCV09AIpxFL87sd42SNpzozrYFIDKEOriNV/cIJBMfG/45nkZ6na9Qux8X6z1Bk7 G6jqL29FH1VleuICm4oSXzwmCHocFRp9dRqWueFSH6vdjI6mKablX7fvqsgGOr7mUnFXurQG/67 +F7ZMaCW6ELNY62DhjV2KGTLueHj2gIfs7Fkr6DIWI+Lk3rGp2Sh18MKL9ecZwSPQ5hYLrF9IqU Z5m2GRlSph+9ejg== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789059424738844090 X-GMAIL-MSGID: 1789059424738844090 |
Series |
filelock: split struct file_lock into file_lock and file_lease structs
|
|
Commit Message
Jeff Layton
Jan. 25, 2024, 10:42 a.m. UTC
Convert posix_owner_key to take struct file_lock_core pointer, and fix
up the callers to pass one in.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/locks.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/locks.c b/fs/locks.c index bd0cfee230ae..effe84f954f9 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -630,9 +630,9 @@ static void locks_delete_global_locks(struct file_lock *fl) } static unsigned long -posix_owner_key(struct file_lock *fl) +posix_owner_key(struct file_lock_core *flc) { - return (unsigned long) fl->fl_core.flc_owner; + return (unsigned long) flc->flc_owner; } static void locks_insert_global_blocked(struct file_lock *waiter) @@ -640,7 +640,7 @@ static void locks_insert_global_blocked(struct file_lock *waiter) lockdep_assert_held(&blocked_lock_lock); hash_add(blocked_hash, &waiter->fl_core.flc_link, - posix_owner_key(waiter)); + posix_owner_key(&waiter->fl_core)); } static void locks_delete_global_blocked(struct file_lock *waiter) @@ -977,7 +977,7 @@ static struct file_lock *what_owner_is_waiting_for(struct file_lock *block_fl) { struct file_lock *fl; - hash_for_each_possible(blocked_hash, fl, fl_core.flc_link, posix_owner_key(block_fl)) { + hash_for_each_possible(blocked_hash, fl, fl_core.flc_link, posix_owner_key(&block_fl->fl_core)) { if (posix_same_owner(&fl->fl_core, &block_fl->fl_core)) { while (fl->fl_core.flc_blocker) fl = fl->fl_core.flc_blocker;