Message ID | 20240131-flsplit-v3-21-c6129007ee8d@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-47307-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp84693dyc; Wed, 31 Jan 2024 15:17:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHiwGus3uMrEsXcwaEoOoLSjhWqYY3FwCdqo0eRCsjqjw/2V3TmVFNYRYs9fiSJZM8CmrL X-Received: by 2002:a17:90a:3ea6:b0:295:fd18:6ec3 with SMTP id k35-20020a17090a3ea600b00295fd186ec3mr1830723pjc.0.1706743038688; Wed, 31 Jan 2024 15:17:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706743038; cv=pass; d=google.com; s=arc-20160816; b=AJSIMwd4snvu36WYbGhWzCf2VBD64dUPG/5RSbfBQwOF8sI34DoUXAb2Q4bRGr49sA 15Iutv9gqsMZqS4VLkYxa/bL+uR+bJqy5DOiRUAzBxu7Hi944ePuwcQ+MQh3XLn0d+pc Vbf3tr980KUOaMc1Gb8FYeszwTvZVLoO/9WDmnAn+iVbDY76JH57qAt6YHAXKriS7Te9 funliN3V0LxahwqnkLBXrOG/B8gSpynqji5KmyCnjyjzL400Drb0QUVQDwdhx4W/VIGt w8rCXVsDHad9ZkPWqknIeGr3aAycdYskmQc46ieiGNB+z6IPHfsUDQ1C7sINgFYKzCu8 9r+Q== 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=m3g00rOHvxSFPgZDKbJ/YBWVUqGumGgBjRepg3JdRl0=; fh=BznZTwZ2qOwrhv9IAynqxkwk+8ar79Yh6nqiWIZjxJ8=; b=HE2UKzkiLfcfm5VXFPKLqX9dT3NwCUs6eW9Hw+tenbry71gIIr1qnf6XQ0SlXji3qD GwiJH3VJypO+i2kOX4OXnkDwhnk3oJ6A5qx94EtV5uFdoVSjzDtQ1ODsbiXcOMTlJ0BF qXaE6CpEyiVJ7EspyQMZk9gPpqIkVmn6qIALwW0PsIE5iNfa5ZK3M+OrtCTkKxN/Gpsg /jjhIlOy1P24pWdro5nKxrBQzYGegWjsGD4MTCwi27EBPnmetI32LkqdkvtB+j87e5Xs xBWmfop90hMRbOdxTLORGK+9qqNyHErzRQ0NAEzCXuX0FyI2cSmgXCOXc37mJTPWQagE YkVA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l0EWzwTc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47307-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47307-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCV9Az/5NA0oFeuw5r9FWChrj3V+ptFCtyhuMQZHogZoCzxv/4Qs4bB/IgeUdTlV22dsUid8rO45/C/8TeNNpQllJHJCJg== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 95-20020a17090a09e800b00292cc08e601si2190219pjo.27.2024.01.31.15.17.18 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 15:17:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47307-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l0EWzwTc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47307-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47307-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CBDB2298342 for <ouuuleilei@gmail.com>; Wed, 31 Jan 2024 23:12:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5096A13D509; Wed, 31 Jan 2024 23:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="l0EWzwTc" 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 45AE213BE9E; Wed, 31 Jan 2024 23:03:39 +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=1706742220; cv=none; b=N801ZuB9zQknjFtHLiMC6bg2cn+Fhs0SelayQjy3v+uih37XYUF3sW+Pl8fw69U/Nv2pS7JGDicQtjY8foBcYT0D1Irnc09yLbtMAjU7XSr07cVy/Typv6Z78bXQ1eR993RhXBgrBUm4J5AHCj5sHW0ZxkRT7UVjTJalomBI7U0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706742220; c=relaxed/simple; bh=oU1l+ksOKxD5QTjyx5Q3wpjW56H/LXw8me0TimuRFek=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Qzfq9uo7dEPth14yVwPCsEGyLmTgoVXcCCo9hCkt4I0tkhgav9ss/kxz0miVGih4CGmP+wJFiBz9oNfuVknUKacl6v9BrpJrNbLj4/GU0s90M2BDg6KTTqJRv/HLH61gAvPlyPSFM4jZknHiNP2G7ePCmtmUkeE1GUA6OSV54uI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=l0EWzwTc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F3E9C43141; Wed, 31 Jan 2024 23:03:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706742219; bh=oU1l+ksOKxD5QTjyx5Q3wpjW56H/LXw8me0TimuRFek=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=l0EWzwTco/GVPhpeXnEma+B+VHEKwsEBFkRAd7vZrdu9jYwrqfrmAfUIfYZYmZwzL RN3C/uo/wWY+tq3uZz+MBYdS1ylWHaA1qkzm5uwF0bk+ug8YaC4WMYkRNiQg6O+ZQT 9PYWd5yav4MMszJqpm2uua7wDOUGGQh2sn6+xCH32wz0q9A4Qt9OkAwHxnMgp9bU5Z E+YDdjKM6392cCgGsYOwNRNjM97+VxcfFGFvFb2LudUsAlTfvP8GnNa/1qr84gNIbw Dy/Nr95zcJ6NcSvFx6Z06NrrJfmurE6nunR/BMLiUjdBsHxDYEDHrEnWag92wJghJj 8l662xfg41J/Q== From: Jeff Layton <jlayton@kernel.org> Date: Wed, 31 Jan 2024 18:02:02 -0500 Subject: [PATCH v3 21/47] 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: <20240131-flsplit-v3-21-c6129007ee8d@kernel.org> References: <20240131-flsplit-v3-0-c6129007ee8d@kernel.org> In-Reply-To: <20240131-flsplit-v3-0-c6129007ee8d@kernel.org> To: Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@kernel.org>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Chuck Lever <chuck.lever@oracle.com>, Alexander Viro <viro@zeniv.linux.org.uk>, Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>, 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>, Andreas Gruenbacher <agruenba@redhat.com>, Neil Brown <neilb@suse.de>, Olga Kornievskaia <kolga@netapp.com>, Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>, Trond Myklebust <trond.myklebust@hammerspace.com>, Anna Schumaker <anna@kernel.org>, 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>, Ronnie Sahlberg <ronniesahlberg@gmail.com>, Shyam Prasad N <sprasad@microsoft.com>, Namjae Jeon <linkinjeon@kernel.org>, Sergey Senozhatsky <senozhatsky@chromium.org>, Miklos Szeredi <miklos@szeredi.hu> Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs@lists.linux.dev, linux-afs@lists.infradead.org, ceph-devel@vger.kernel.org, gfs2@lists.linux.dev, linux-nfs@vger.kernel.org, ocfs2-devel@lists.linux.dev, linux-cifs@vger.kernel.org, Jeff Layton <jlayton@kernel.org> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1468; i=jlayton@kernel.org; h=from:subject:message-id; bh=oU1l+ksOKxD5QTjyx5Q3wpjW56H/LXw8me0TimuRFek=; b=owEBbQKS/ZANAwAIAQAOaEEZVoIVAcsmYgBlutFwRfnmGuw+kZZnzAb0prMEAPMNT9x3XjV3y MD6YsS59veJAjMEAAEIAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCZbrRcAAKCRAADmhBGVaC FT4FEADHoubPCG9Ssate8KyC9UXdDZ52tJtOxTqhlYEsbKtOcDqrSPS0oiQ3lP3JFrisKxkdoff Dn5yeZ2Y5B88LmvpyXU+/drV1HMyZrg07QbmtlsD7QvzrVxHstydUmz1qaHu9+ogiz8e/53quq5 rS+8qwY3FG+jj6HIxSGqyfA2ow2IrjNnwkctfhBJXTD/uMpZBFccBdsXBl/SE6Vm4tNBY6i5Mtf 51lTNEoOo6jsyJ2Cn6QInC5PFcx+kzF/5ZUfjMv/KU1c5gvVESxaKHNQzfsZd9h8f1nMGa8edhH EUc4oP5/FpO01ZhN96OT7whltuYwE4BvUJI1QKGlaCXUSeV0gAKCcs5Twt+DnuHGDIOIgRmjC47 6wJl3TZIuJ86XRfSbUrJv8TJT2/UTcmSzmNvRy34kKlMMweNBbwNknDDHb95lb44YBzpG+LkLb8 vTRPfBAY1sAA7ySLIO61TPJk2bp19fNF2mC31sKxEgjuiMCfSKG07R95pKgYe21Q0ofvq9ql9mJ sZHhcZ5ntsbfxlL7HtU3/oD0oQHFq2mjZPI8ZX5idbyawcQv9CYDOmZdbu+RkpSfLxSPjj4ATbj qF7USRAnnbgGRgCcAPLNLHa4qGsnPQJAD7hbNJ1zpQ7J4PQgWXurWpfqcheZ3PHSXUwFpWu3JEm W9lPU4Ot6JLf1Mw== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789649788736438829 X-GMAIL-MSGID: 1789649788736438829 |
Series |
filelock: split file leases out of struct file_lock
|
|
Commit Message
Jeff Layton
Jan. 31, 2024, 11:02 p.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 9ff331b55b7a..1cfd02562e9f 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->c.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->c.flc_link, - posix_owner_key(waiter)); + posix_owner_key(&waiter->c)); } 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, c.flc_link, posix_owner_key(block_fl)) { + hash_for_each_possible(blocked_hash, fl, c.flc_link, posix_owner_key(&block_fl->c)) { if (posix_same_owner(&fl->c, &block_fl->c)) { while (fl->c.flc_blocker) fl = fl->c.flc_blocker;