From: Jeff Layton Date: Tue, 28 Apr 2026 07:09:45 +0000 (+0100) Subject: filelock: pass current blocking lease to trace_break_lease_block() rather than "new_fl" X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=89330d3a60f7ddb9cf42873bb5249d6a736a0eab;p=thirdparty%2Flinux.git filelock: pass current blocking lease to trace_break_lease_block() rather than "new_fl" The break_lease_block tracepoint currently just shows the type of "new_fl", which we can predict from the "flags" value. Switch it to display info about "fl" instead, as that's the file_lease on which the code is blocking. For trace_break_lease_unblock(), pass it a NULL pointer. "fl" may have been freed by that point, and passing it the info in new_fl is deceptive. Signed-off-by: Jeff Layton Link: https://patch.msgid.link/20260428-dir-deleg-v3-1-5a0780ba9def@kernel.org Acked-by: Chuck Lever Signed-off-by: Christian Brauner --- diff --git a/fs/locks.c b/fs/locks.c index fead53474c300..3306892900c4c 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -1691,7 +1691,7 @@ restart: } else break_time++; locks_insert_block(&fl->c, &new_fl->c, leases_conflict); - trace_break_lease_block(inode, new_fl); + trace_break_lease_block(inode, fl); spin_unlock(&ctx->flc_lock); percpu_up_read(&file_rwsem); @@ -1702,7 +1702,7 @@ restart: percpu_down_read(&file_rwsem); spin_lock(&ctx->flc_lock); - trace_break_lease_unblock(inode, new_fl); + trace_break_lease_unblock(inode, NULL); __locks_delete_block(&new_fl->c); if (error >= 0) { /*