[PATCH 15/61] locks: update /proc/locks format for u64 i_ino

Jeff Layton
2026-02-26T15:59:26Z

Update the seq_printf format string in lock_get_status() from %lu to
%llu for printing inode->i_ino, since i_ino is now u64.

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

diff --git a/fs/locks.c b/fs/locks.c
index d13ec930b7bb03905df50bdce30b84749edab8d0..d8b066fb42108971f6b3c7449dbc9b5f8df16b13 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -234,7 +234,7 @@ locks_check_ctx_lists(struct inode *inode)
if (unlikely(!list_empty(&ctx->flc_flock) ||
!list_empty(&ctx->flc_posix) ||
!list_empty(&ctx->flc_lease))) {
- pr_warn("Leaked locks on dev=0x%x:0x%x ino=0x%lx:\n",
+ pr_warn("Leaked locks on dev=0x%x:0x%x ino=0x%llx:\n",
MAJOR(inode->i_sb->s_dev), MINOR(inode->i_sb->s_dev),
inode->i_ino);
locks_dump_ctx_list(&ctx->flc_flock, "FLOCK");
@@ -251,7 +251,7 @@ locks_check_ctx_file_list(struct file *filp, struct list_head *list, char *list_

list_for_each_entry(flc, list, flc_list)
if (flc->flc_file == filp)
- pr_warn("Leaked %s lock on dev=0x%x:0x%x ino=0x%lx "
+ pr_warn("Leaked %s lock on dev=0x%x:0x%x ino=0x%llx "
" fl_owner=%p fl_flags=0x%x fl_type=0x%x fl_pid=%u\n",
list_type, MAJOR(inode->i_sb->s_dev),
MINOR(inode->i_sb->s_dev), inode->i_ino,
@@ -2896,7 +2896,7 @@ static void lock_get_status(struct seq_file *f, struct file_lock_core *flc,
(type == F_RDLCK) ? "READ" : "UNLCK");
if (inode) {
/* userspace relies on this representation of dev_t */
- seq_printf(f, "%d %02x:%02x:%lu ", pid,
+ seq_printf(f, "%d %02x:%02x:%llu ", pid,
MAJOR(inode->i_sb->s_dev),
MINOR(inode->i_sb->s_dev), inode->i_ino);
} else {

--
2.53.0