locks: print unsigned ino in /proc/locks
authorAmir Goldstein <amir73il@gmail.com>
Sun, 22 Dec 2019 18:45:28 +0000 (20:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2020 09:17:55 +0000 (10:17 +0100)
commit 98ca480a8f22fdbd768e3dad07024c8d4856576c upstream.

An ino is unsigned, so display it as such in /proc/locks.

Cc: stable@vger.kernel.org
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/locks.c

index 665e3ce9ab4765ab2e73d2bb8f2dd0d450157f38..1a40e277eb5e1ddaa3efef35570ee39cfa0019ce 100644 (file)
@@ -2691,7 +2691,7 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl,
        }
        if (inode) {
                /* userspace relies on this representation of dev_t */
-               seq_printf(f, "%d %02x:%02x:%ld ", fl_pid,
+               seq_printf(f, "%d %02x:%02x:%lu ", fl_pid,
                                MAJOR(inode->i_sb->s_dev),
                                MINOR(inode->i_sb->s_dev), inode->i_ino);
        } else {