diff mbox series

[10/20] filelock: convert locks_{insert,delete}_global_blocked

Message ID 20240116-flsplit-v1-10-c9d0f4370a5d@kernel.org (mailing list archive)
State New, archived
Headers show
Series filelock: split struct file_lock into file_lock and file_lease structs | expand

Commit Message

Jeff Layton Jan. 16, 2024, 7:46 p.m. UTC
Have locks_insert_global_blocked and locks_delete_global_blocked take a
struct file_lock_core pointer.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/locks.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/fs/locks.c b/fs/locks.c
index 5fe54f48b9c1..770aaa5809ba 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -642,19 +642,18 @@  posix_owner_key(struct file_lock_core *flc)
 	return (unsigned long) flc->fl_owner;
 }
 
-static void locks_insert_global_blocked(struct file_lock *waiter)
+static void locks_insert_global_blocked(struct file_lock_core *waiter)
 {
 	lockdep_assert_held(&blocked_lock_lock);
 
-	hash_add(blocked_hash, &waiter->fl_core.fl_link,
-		 posix_owner_key(&waiter->fl_core));
+	hash_add(blocked_hash, &waiter->fl_link, posix_owner_key(waiter));
 }
 
-static void locks_delete_global_blocked(struct file_lock *waiter)
+static void locks_delete_global_blocked(struct file_lock_core *waiter)
 {
 	lockdep_assert_held(&blocked_lock_lock);
 
-	hash_del(&waiter->fl_core.fl_link);
+	hash_del(&waiter->fl_link);
 }
 
 /* Remove waiter from blocker's block list.
@@ -664,7 +663,7 @@  static void locks_delete_global_blocked(struct file_lock *waiter)
  */
 static void __locks_delete_block(struct file_lock *waiter)
 {
-	locks_delete_global_blocked(waiter);
+	locks_delete_global_blocked(&waiter->fl_core);
 	list_del_init(&waiter->fl_core.fl_blocked_member);
 }
 
@@ -775,7 +774,7 @@  static void __locks_insert_block(struct file_lock *blocker,
 	list_add_tail(&waiter->fl_core.fl_blocked_member,
 		      &blocker->fl_core.fl_blocked_requests);
 	if (IS_POSIX(blocker) && !IS_OFDLCK(blocker))
-		locks_insert_global_blocked(waiter);
+		locks_insert_global_blocked(&waiter->fl_core);
 
 	/* The requests in waiter->fl_blocked are known to conflict with
 	 * waiter, but might not conflict with blocker, or the requests