Convert some internal fs/locks.c function to take and deal with struct
file_lock_core instead of struct file_lock:

- locks_init_lock_heads
- locks_alloc_lock
- locks_init_lock

Signed-off-by: Jeff Layton <jlay...@kernel.org>
---
 fs/locks.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/fs/locks.c b/fs/locks.c
index b06fa4dea298..3a91515dbccd 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -251,13 +251,13 @@ locks_free_lock_context(struct inode *inode)
        }
 }
 
-static void locks_init_lock_heads(struct file_lock *fl)
+static void locks_init_lock_heads(struct file_lock_core *flc)
 {
-       INIT_HLIST_NODE(&fl->fl_core.flc_link);
-       INIT_LIST_HEAD(&fl->fl_core.flc_list);
-       INIT_LIST_HEAD(&fl->fl_core.flc_blocked_requests);
-       INIT_LIST_HEAD(&fl->fl_core.flc_blocked_member);
-       init_waitqueue_head(&fl->fl_core.flc_wait);
+       INIT_HLIST_NODE(&flc->flc_link);
+       INIT_LIST_HEAD(&flc->flc_list);
+       INIT_LIST_HEAD(&flc->flc_blocked_requests);
+       INIT_LIST_HEAD(&flc->flc_blocked_member);
+       init_waitqueue_head(&flc->flc_wait);
 }
 
 /* Allocate an empty lock structure. */
@@ -266,7 +266,7 @@ struct file_lock *locks_alloc_lock(void)
        struct file_lock *fl = kmem_cache_zalloc(filelock_cache, GFP_KERNEL);
 
        if (fl)
-               locks_init_lock_heads(fl);
+               locks_init_lock_heads(&fl->fl_core);
 
        return fl;
 }
@@ -347,7 +347,7 @@ locks_dispose_list(struct list_head *dispose)
 void locks_init_lock(struct file_lock *fl)
 {
        memset(fl, 0, sizeof(struct file_lock));
-       locks_init_lock_heads(fl);
+       locks_init_lock_heads(&fl->fl_core);
 }
 EXPORT_SYMBOL(locks_init_lock);
 

-- 
2.43.0


Reply via email to