From: Chuck Lever Date: Tue, 12 May 2026 18:13:38 +0000 (-0400) Subject: lockd: Drop locks_init_lock() from nlm4_lock_to_lockd_lock() X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=6d4c0dfeba728f2d06f634f02eb7606b82d87fbd;p=thirdparty%2Fkernel%2Flinux.git lockd: Drop locks_init_lock() from nlm4_lock_to_lockd_lock() The NLMv4 GRANTED helper passes the wrapper's lock to nlmclnt_grant(), which compares only fl_start, fl_end, svid, and fh, and the shared nlmclnt_lock_event tracepoint now sources its byte-range fields from fl_start and fl_end as well. Both fl_start and fl_end are set unconditionally by lockd_set_file_lock_range4() on the line below, so the locks_init_lock() call left no observable effect: every other field of struct file_lock is unread on the GRANTED path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever --- diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c index fc9ed4abb7caf..2bd71bc2b481e 100644 --- a/fs/lockd/svc4proc.c +++ b/fs/lockd/svc4proc.c @@ -119,7 +119,6 @@ nlm4_lock_to_nlm_lock(struct nlm_lock *lock, struct nlm4_lock *alock) lock->oh.len = alock->oh.len; lock->oh.data = alock->oh.data; lock->svid = alock->svid; - locks_init_lock(&lock->fl); lockd_set_file_lock_range4(&lock->fl, alock->l_offset, alock->l_len); return nlm_granted; }