Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

filelock: convert locks_wake_up_blocks to take a file_lock_core pointer

Have locks_wake_up_blocks take a 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-30-c6129007ee8d@kernel.org
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Jeff Layton and committed by
Christian Brauner
347d49fd d9077f7b

+7 -7
+7 -7
fs/locks.c
··· 806 806 * 807 807 * Must be called with the inode->flc_lock held! 808 808 */ 809 - static void locks_wake_up_blocks(struct file_lock *blocker) 809 + static void locks_wake_up_blocks(struct file_lock_core *blocker) 810 810 { 811 811 /* 812 812 * Avoid taking global lock if list is empty. This is safe since new ··· 815 815 * fl_blocked_requests list does not require the flc_lock, so we must 816 816 * recheck list_empty() after acquiring the blocked_lock_lock. 817 817 */ 818 - if (list_empty(&blocker->c.flc_blocked_requests)) 818 + if (list_empty(&blocker->flc_blocked_requests)) 819 819 return; 820 820 821 821 spin_lock(&blocked_lock_lock); 822 - __locks_wake_up_blocks(&blocker->c); 822 + __locks_wake_up_blocks(blocker); 823 823 spin_unlock(&blocked_lock_lock); 824 824 } 825 825 ··· 835 835 { 836 836 locks_delete_global_locks(&fl->c); 837 837 list_del_init(&fl->c.flc_list); 838 - locks_wake_up_blocks(fl); 838 + locks_wake_up_blocks(&fl->c); 839 839 } 840 840 841 841 static void ··· 1328 1328 locks_insert_lock_ctx(left, &fl->c.flc_list); 1329 1329 } 1330 1330 right->fl_start = request->fl_end + 1; 1331 - locks_wake_up_blocks(right); 1331 + locks_wake_up_blocks(&right->c); 1332 1332 } 1333 1333 if (left) { 1334 1334 left->fl_end = request->fl_start - 1; 1335 - locks_wake_up_blocks(left); 1335 + locks_wake_up_blocks(&left->c); 1336 1336 } 1337 1337 out: 1338 1338 spin_unlock(&ctx->flc_lock); ··· 1414 1414 if (error) 1415 1415 return error; 1416 1416 lease_clear_pending(fl, arg); 1417 - locks_wake_up_blocks(fl); 1417 + locks_wake_up_blocks(&fl->c); 1418 1418 if (arg == F_UNLCK) { 1419 1419 struct file *filp = fl->c.flc_file; 1420 1420