summaryrefslogtreecommitdiffstats
path: root/fs/locks.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2024-01-31 18:02:02 -0500
committerChristian Brauner <brauner@kernel.org>2024-02-05 13:11:39 +0100
commitad399740bd41da5558d8b8b2b19481740ca063cb (patch)
treec82ebb48cbe8dae0057230f6a083c1452acd5aae /fs/locks.c
parent9bb430a89d2dfce58a3d61a3a04e149109d3934e (diff)
downloadlinux-ad399740bd41da5558d8b8b2b19481740ca063cb.tar.gz
linux-ad399740bd41da5558d8b8b2b19481740ca063cb.tar.bz2
linux-ad399740bd41da5558d8b8b2b19481740ca063cb.zip
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@kernel.org> Link: https://lore.kernel.org/r/20240131-flsplit-v3-21-c6129007ee8d@kernel.org Reviewed-by: NeilBrown <neilb@suse.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c8
1 files 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;