[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240116-flsplit-v1-8-c9d0f4370a5d@kernel.org>
Date: Tue, 16 Jan 2024 14:46:04 -0500
From: Jeff Layton <jlayton@...nel.org>
To: Christian Brauner <brauner@...nel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Eric Van Hensbergen <ericvh@...nel.org>,
Latchesar Ionkov <lucho@...kov.net>,
Dominique Martinet <asmadeus@...ewreck.org>,
Christian Schoenebeck <linux_oss@...debyte.com>,
David Howells <dhowells@...hat.com>, Marc Dionne <marc.dionne@...istor.com>,
Xiubo Li <xiubli@...hat.com>, Ilya Dryomov <idryomov@...il.com>,
Alexander Aring <aahringo@...hat.com>, David Teigland <teigland@...hat.com>,
Miklos Szeredi <miklos@...redi.hu>,
Andreas Gruenbacher <agruenba@...hat.com>,
Trond Myklebust <trond.myklebust@...merspace.com>,
Anna Schumaker <anna@...nel.org>, Chuck Lever <chuck.lever@...cle.com>,
Neil Brown <neilb@...e.de>, Olga Kornievskaia <kolga@...app.com>,
Dai Ngo <Dai.Ngo@...cle.com>, Tom Talpey <tom@...pey.com>,
Jan Kara <jack@...e.cz>, Mark Fasheh <mark@...heh.com>,
Joel Becker <jlbec@...lplan.org>, Joseph Qi <joseph.qi@...ux.alibaba.com>,
Steve French <sfrench@...ba.org>, Paulo Alcantara <pc@...guebit.com>,
Ronnie Sahlberg <lsahlber@...hat.com>,
Shyam Prasad N <sprasad@...rosoft.com>, Namjae Jeon <linkinjeon@...nel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: linux-kernel@...r.kernel.org, v9fs@...ts.linux.dev,
linux-afs@...ts.infradead.org, ceph-devel@...r.kernel.org,
gfs2@...ts.linux.dev, linux-fsdevel@...r.kernel.org,
linux-nfs@...r.kernel.org, ocfs2-devel@...ts.linux.dev,
linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
linux-trace-kernel@...r.kernel.org, Jeff Layton <jlayton@...nel.org>
Subject: [PATCH 08/20] filelock: convert posix_owner_key to take
file_lock_core arg
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@...nel.org>
---
fs/locks.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/locks.c b/fs/locks.c
index 0c47497eb1a4..6432bcfb55a0 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -637,9 +637,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.fl_owner;
+ return (unsigned long) flc->fl_owner;
}
static void locks_insert_global_blocked(struct file_lock *waiter)
@@ -647,7 +647,7 @@ static void locks_insert_global_blocked(struct file_lock *waiter)
lockdep_assert_held(&blocked_lock_lock);
hash_add(blocked_hash, &waiter->fl_core.fl_link,
- posix_owner_key(waiter));
+ posix_owner_key(&waiter->fl_core));
}
static void locks_delete_global_blocked(struct file_lock *waiter)
@@ -984,7 +984,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.fl_link, posix_owner_key(block_fl)) {
+ hash_for_each_possible(blocked_hash, fl, fl_core.fl_link, posix_owner_key(&block_fl->fl_core)) {
if (posix_same_owner(&fl->fl_core, &block_fl->fl_core)) {
while (fl->fl_core.fl_blocker)
fl = fl->fl_core.fl_blocker;
--
2.43.0
Powered by blists - more mailing lists