From nobody Tue Mar 3 05:08:38 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48AF5481A81; Mon, 2 Mar 2026 20:31:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772483518; cv=none; b=iuwClRKp/z9BEmIaSa4nTKB5+OkPEZ6VVtutJCuxBSKJpTICE4DWAOe9wn9TmOrYgkpTUHONwcDFDK+TFk6V6qPTWH5u1ctub44E1/660zxharmObmv/Encn31eFNTxKuZ8FWU8OrTG8zVSmYBWmfPrTs38ASTXZw/B3iUCiKp0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772483518; c=relaxed/simple; bh=XoVTzN6eBFxJLa+BE/pk+HgcXW2U/zY8piTlCXX74Rc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Qs+60vJlhwdZZb6Q4ZmI+zJFl/AbtgZPuzEpoFN72Zcf3BNTe7BbeX0+ERoEDJaBqKFSvS4BroDkNwVP/FU513jY4Gx2CKbCnipfZ4lfYBJtrPkcAssyPMIGDU/79VS9I3EPDVpP80lg4uf8Is3p8q1B1RLxaGU44D946WNm9dU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Li6sL0a+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Li6sL0a+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFEF4C19423; Mon, 2 Mar 2026 20:31:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772483517; bh=XoVTzN6eBFxJLa+BE/pk+HgcXW2U/zY8piTlCXX74Rc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Li6sL0a+oyYaZb5loMXRQVVEBqU5MM+GmRSYreCrPJmP26o1SIPa0bN8EuAYhSZYk OBNRTSv6Dv1enDzk4AG3b7TJmehy8EMyM1JloGvvoov1tJBTbMNPMlQoeXgjWDiE1K qqRX/Nr/WHSlT2DFVPAMNRywBNda1P9ICWR7mV/0eAEkOqQjOKufgWQ5XS4uj0JS3/ 58xxHS1csLhK6vkvYAxdIwyo5hfFIQblKazZHdPySc0O8GZ8ZAluKPBWA5oTReccst LujABIFDexfk7Iq1ESPn7xqWw3YoUVFXLb0R3MC2wPClKxcaSnCpEl/EjO7SGs7LXb tsDDMqy6zc3zA== From: Jeff Layton Date: Mon, 02 Mar 2026 15:24:13 -0500 Subject: [PATCH v2 029/110] ext2: use PRIino format for i_ino Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260302-iino-u64-v2-29-e5388800dae0@kernel.org> References: <20260302-iino-u64-v2-0-e5388800dae0@kernel.org> In-Reply-To: <20260302-iino-u64-v2-0-e5388800dae0@kernel.org> To: Alexander Viro , Christian Brauner , Jan Kara , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Dan Williams , Matthew Wilcox , Eric Biggers , "Theodore Y. Ts'o" , Muchun Song , Oscar Salvador , David Hildenbrand , David Howells , Paulo Alcantara , Andreas Dilger , Jan Kara , Jaegeuk Kim , Chao Yu , Trond Myklebust , Anna Schumaker , Chuck Lever , NeilBrown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Steve French , Ronnie Sahlberg , Shyam Prasad N , Bharath SM , Alexander Aring , Ryusuke Konishi , Viacheslav Dubeyko , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , David Sterba , Marc Dionne , Ian Kent , Luis de Bethencourt , Salah Triki , "Tigran A. Aivazian" , Ilya Dryomov , Alex Markuze , Jan Harkes , coda@cs.cmu.edu, Nicolas Pitre , Tyler Hicks , Amir Goldstein , Christoph Hellwig , John Paul Adrian Glaubitz , Yangtao Li , Mikulas Patocka , David Woodhouse , Richard Weinberger , Dave Kleikamp , Konstantin Komarov , Mark Fasheh , Joel Becker , Joseph Qi , Mike Marshall , Martin Brandenburg , Miklos Szeredi , Anders Larsen , Zhihao Cheng , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Mimi Zohar , Roberto Sassu , Dmitry Kasatkin , Eric Snowberg , Fan Wu , Stephen Smalley , Ondrej Mosnacek , Casey Schaufler , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , David Airlie , Simona Vetter , Sumit Semwal , Eric Dumazet , Kuniyuki Iwashima , Paolo Abeni , Willem de Bruijn , "David S. Miller" , Jakub Kicinski , Simon Horman , Oleg Nesterov , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , James Clark , "Darrick J. Wong" , Martin Schiller , Eric Paris , Joerg Reuter , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Oliver Hartkopp , Marc Kleine-Budde , David Ahern , Neal Cardwell , Steffen Klassert , Herbert Xu , Remi Denis-Courmont , Marcelo Ricardo Leitner , Xin Long , Magnus Karlsson , Maciej Fijalkowski , Stanislav Fomichev , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, nvdimm@lists.linux.dev, fsverity@lists.linux.dev, linux-mm@kvack.org, netfs@lists.linux.dev, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-nilfs@vger.kernel.org, v9fs@lists.linux.dev, linux-afs@lists.infradead.org, autofs@vger.kernel.org, ceph-devel@vger.kernel.org, codalist@coda.cs.cmu.edu, ecryptfs@vger.kernel.org, linux-mtd@lists.infradead.org, jfs-discussion@lists.sourceforge.net, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, devel@lists.orangefs.org, linux-unionfs@vger.kernel.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, linux-integrity@vger.kernel.org, selinux@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, netdev@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-xfs@vger.kernel.org, linux-hams@vger.kernel.org, linux-x25@vger.kernel.org, audit@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-can@vger.kernel.org, linux-sctp@vger.kernel.org, bpf@vger.kernel.org, Jeff Layton X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=7599; i=jlayton@kernel.org; h=from:subject:message-id; bh=XoVTzN6eBFxJLa+BE/pk+HgcXW2U/zY8piTlCXX74Rc=; b=owEBbQKS/ZANAwAKAQAOaEEZVoIVAcsmYgBppfH2w5Kjq4Q8NCePjxszp9Wu5rq+HJV6Zr+aA xQGuM4HB8KJAjMEAAEKAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCaaXx9gAKCRAADmhBGVaC FaQdD/9NXJ014MXWsM0uAaawc1kzXHnQlnBEkq2ZeON6ZwhV7CSSGDYwroD6I+qfapTTiD3jXcd Vv91VggjPIwqKecXFfuVetJ5B1jcGosi9aCSzi4raBk/H1Me+mWSGXfzu/UbDcq4Voib3Ie0xDy 9q8iKw5ESYgO7fN8ym9mxGXlQ/QmsVyEaow+0HgrI5x+csk5o5CUD3j7Bv9XjJ/kbROoLj/O4io lUXibWs++d0XTW/ZFelDxtjGSs7AW97lN4d0OVRa3BYuqW53vpW1xK1fhNQHQb60pKle6r0pIFA EJTTPtguR6pb0ZiKMlC5co9czELzU7uoX5qqbh3lAYNbKwQ4tm2rJxf1wx1SyTJBN95fbkXR9QU GA9zL/OdsrM6s7XTqWbFrzaouw4mTyjroSyF87iEHX8CinFBxMlMJbtQGCExULWYNAJLcW4LAac QBx8NvfE/3VxJzIVjvKSynV6xJm/0jf7BRoCQSLGCjgC2M9Y92WDxIlNJe1I3NDiK6oCVwY8N/P RAai1/XqSyTwjz4HvSzW7yC4kF4IoYiQMEkKxDg118CeFfl2nYUaNynVWJt7+CutXoSOA4QFUi6 fsqvliM7tl7pbZniEYsaTfx1PtOVhrNEORSL8mgP8TBeHplfYrtwfRF5I2WIHWQQhCiEk3iOxDP 9IMmkuJ5S8qUbJw== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 Convert ext2 i_ino format strings to use the PRIino format macro in preparation for the widening of i_ino via kino_t. Also correct signed format specifiers to unsigned, since inode numbers are unsigned values. Signed-off-by: Jeff Layton --- fs/ext2/dir.c | 10 +++++----- fs/ext2/ialloc.c | 9 +++++---- fs/ext2/inode.c | 2 +- fs/ext2/xattr.c | 14 +++++++------- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 395fc36c089b7bb6360a8326727bd5606c7e2476..f87106907da31bb7c1ca65c0ec2= dcc0d47d27c62 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -141,7 +141,7 @@ static bool ext2_check_folio(struct folio *folio, int q= uiet, char *kaddr) Ebadsize: if (!quiet) ext2_error(sb, __func__, - "size of directory #%lu is not a multiple " + "size of directory #%" PRIino "u is not a multiple " "of chunk size", dir->i_ino); goto fail; Eshort: @@ -160,7 +160,7 @@ static bool ext2_check_folio(struct folio *folio, int q= uiet, char *kaddr) error =3D "inode out of bounds"; bad_entry: if (!quiet) - ext2_error(sb, __func__, "bad entry in directory #%lu: : %s - " + ext2_error(sb, __func__, "bad entry in directory #%" PRIino "u: : %s - " "offset=3D%llu, inode=3D%lu, rec_len=3D%d, name_len=3D%d", dir->i_ino, error, folio_pos(folio) + offs, (unsigned long) le32_to_cpu(p->inode), @@ -170,7 +170,7 @@ static bool ext2_check_folio(struct folio *folio, int q= uiet, char *kaddr) if (!quiet) { p =3D (ext2_dirent *)(kaddr + offs); ext2_error(sb, "ext2_check_folio", - "entry in directory #%lu spans the page boundary" + "entry in directory #%" PRIino "u spans the page boundary" "offset=3D%llu, inode=3D%lu", dir->i_ino, folio_pos(folio) + offs, (unsigned long) le32_to_cpu(p->inode)); @@ -281,7 +281,7 @@ ext2_readdir(struct file *file, struct dir_context *ctx) =20 if (IS_ERR(kaddr)) { ext2_error(sb, __func__, - "bad page in #%lu", + "bad page in #%" PRIino "u", inode->i_ino); ctx->pos +=3D PAGE_SIZE - offset; return PTR_ERR(kaddr); @@ -383,7 +383,7 @@ struct ext2_dir_entry_2 *ext2_find_entry (struct inode = *dir, /* next folio is past the blocks we've got */ if (unlikely(n > (dir->i_blocks >> (PAGE_SHIFT - 9)))) { ext2_error(dir->i_sb, __func__, - "dir %lu size %lld exceeds block count %llu", + "dir %" PRIino "u size %lld exceeds block count %llu", dir->i_ino, dir->i_size, (unsigned long long)dir->i_blocks); goto out; diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c index fdf63e9c6e7caa6d5267c25faa6c293622f00627..6a317411e54191578343308b5a3= 990aea9c36436 100644 --- a/fs/ext2/ialloc.c +++ b/fs/ext2/ialloc.c @@ -169,9 +169,10 @@ static void ext2_preread_inode(struct inode *inode) unsigned long block_group; unsigned long offset; unsigned long block; + unsigned int ino =3D inode->i_ino; struct ext2_group_desc * gdp; =20 - block_group =3D (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(inode->i_sb); + block_group =3D (ino - 1) / EXT2_INODES_PER_GROUP(inode->i_sb); gdp =3D ext2_get_group_desc(inode->i_sb, block_group, NULL); if (gdp =3D=3D NULL) return; @@ -179,7 +180,7 @@ static void ext2_preread_inode(struct inode *inode) /* * Figure out the offset within the block group inode table */ - offset =3D ((inode->i_ino - 1) % EXT2_INODES_PER_GROUP(inode->i_sb)) * + offset =3D ((ino - 1) % EXT2_INODES_PER_GROUP(inode->i_sb)) * EXT2_INODE_SIZE(inode->i_sb); block =3D le32_to_cpu(gdp->bg_inode_table) + (offset >> EXT2_BLOCK_SIZE_BITS(inode->i_sb)); @@ -381,7 +382,7 @@ static int find_group_other(struct super_block *sb, str= uct inode *parent) * * So add our directory's i_ino into the starting point for the hash. */ - group =3D (group + parent->i_ino) % ngroups; + group =3D (group + (unsigned int)parent->i_ino) % ngroups; =20 /* * Use a quadratic hash to find a group with a free inode and some @@ -589,7 +590,7 @@ struct inode *ext2_new_inode(struct inode *dir, umode_t= mode, goto fail_free_drop; =20 mark_inode_dirty(inode); - ext2_debug("allocating inode %lu\n", inode->i_ino); + ext2_debug("allocating inode %" PRIino "u\n", inode->i_ino); ext2_preread_inode(inode); return inode; =20 diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index dbfe9098a1245d97ba97cff24395754197043c33..0ca9148583646812b478f01fd35= bcad11498f951 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c @@ -1152,7 +1152,7 @@ static void ext2_free_branches(struct inode *inode, _= _le32 *p, __le32 *q, int de */=20 if (!bh) { ext2_error(inode->i_sb, "ext2_free_branches", - "Read failure, inode=3D%ld, block=3D%ld", + "Read failure, inode=3D%" PRIino "u, block=3D%ld", inode->i_ino, nr); continue; } diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index c885dcc3bd0d180c4c3f0945ca23ed8ce569ef10..4b3dadc0a2a47c85682d9c74edb= 900cf0f20996f 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c @@ -227,7 +227,7 @@ ext2_xattr_get(struct inode *inode, int name_index, con= st char *name, if (!ext2_xattr_header_valid(HDR(bh))) { bad_block: ext2_error(inode->i_sb, "ext2_xattr_get", - "inode %ld: bad block %d", inode->i_ino, + "inode %" PRIino "u: bad block %d", inode->i_ino, EXT2_I(inode)->i_file_acl); error =3D -EIO; goto cleanup; @@ -313,7 +313,7 @@ ext2_xattr_list(struct dentry *dentry, char *buffer, si= ze_t buffer_size) if (!ext2_xattr_header_valid(HDR(bh))) { bad_block: ext2_error(inode->i_sb, "ext2_xattr_list", - "inode %ld: bad block %d", inode->i_ino, + "inode %" PRIino "u: bad block %d", inode->i_ino, EXT2_I(inode)->i_file_acl); error =3D -EIO; goto cleanup; @@ -454,7 +454,7 @@ ext2_xattr_set(struct inode *inode, int name_index, con= st char *name, if (!ext2_xattr_header_valid(header)) { bad_block: ext2_error(sb, "ext2_xattr_set", - "inode %ld: bad block %d", inode->i_ino,=20 + "inode %" PRIino "u: bad block %d", inode->i_ino, EXT2_I(inode)->i_file_acl); error =3D -EIO; goto cleanup; @@ -833,7 +833,7 @@ ext2_xattr_delete_inode(struct inode *inode) =20 if (!ext2_data_block_valid(sbi, EXT2_I(inode)->i_file_acl, 1)) { ext2_error(inode->i_sb, "ext2_xattr_delete_inode", - "inode %ld: xattr block %d is out of data blocks range", + "inode %" PRIino "u: xattr block %d is out of data blocks range", inode->i_ino, EXT2_I(inode)->i_file_acl); goto cleanup; } @@ -841,14 +841,14 @@ ext2_xattr_delete_inode(struct inode *inode) bh =3D sb_bread(inode->i_sb, EXT2_I(inode)->i_file_acl); if (!bh) { ext2_error(inode->i_sb, "ext2_xattr_delete_inode", - "inode %ld: block %d read error", inode->i_ino, + "inode %" PRIino "u: block %d read error", inode->i_ino, EXT2_I(inode)->i_file_acl); goto cleanup; } ea_bdebug(bh, "b_count=3D%d", atomic_read(&(bh->b_count))); if (!ext2_xattr_header_valid(HDR(bh))) { ext2_error(inode->i_sb, "ext2_xattr_delete_inode", - "inode %ld: bad block %d", inode->i_ino, + "inode %" PRIino "u: bad block %d", inode->i_ino, EXT2_I(inode)->i_file_acl); goto cleanup; } @@ -952,7 +952,7 @@ ext2_xattr_cache_find(struct inode *inode, struct ext2_= xattr_header *header) bh =3D sb_bread(inode->i_sb, ce->e_value); if (!bh) { ext2_error(inode->i_sb, "ext2_xattr_cache_find", - "inode %ld: block %ld read error", + "inode %" PRIino "u: block %ld read error", inode->i_ino, (unsigned long) ce->e_value); } else { lock_buffer(bh); --=20 2.53.0