From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CB0D1EB3633 for ; Mon, 2 Mar 2026 20:25:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 219AA6B0005; Mon, 2 Mar 2026 15:25:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1EE6F6B0089; Mon, 2 Mar 2026 15:25:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 098B86B008A; Mon, 2 Mar 2026 15:25:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id E74C06B0005 for ; Mon, 2 Mar 2026 15:25:32 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 8BC961C2D8 for ; Mon, 2 Mar 2026 20:25:32 +0000 (UTC) X-FDA: 84502253304.01.A2894B8 Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by imf09.hostedemail.com (Postfix) with ESMTP id C041D14000F for ; Mon, 2 Mar 2026 20:25:30 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=h1YsGwEm; spf=pass (imf09.hostedemail.com: domain of jlayton@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=jlayton@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1772483130; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=pNLGTCYpPU0Zdb32XtgOndq80QkAo3EbPBhcCvj3Q1Q=; b=vMxlzP3Sp/y7hPZw66magoElKeM9zcjwKYmq842m9PVkoQkgg66uyyCOffgt2as4iQzSq/ AtNNtO9Ic3LgdV0AhpKzBo7dZTg6QVnvhrJlBAWPI+8/EQyMzeJQ6GDzRKQkG1wM8RUfGl 64zSZOhNGxi0PrrWuVlk+H95xyrRqeM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1772483130; a=rsa-sha256; cv=none; b=Blx+nAPrGUV79P4wDUJDk9F+Dg63WbxkkoppbKnE1hPM4JF4sPI5I18xs6eQrj2mgLRVsy 6RRBJ0JzcyYjbjNMWMSnf1tJPHIPeYYBB9g8fB+VTdVxc9yUDuTlPe7o7JBcG734bSBykA CF2/B69qGt/AajMyauMV73no9UcNu/k= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=h1YsGwEm; spf=pass (imf09.hostedemail.com: domain of jlayton@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=jlayton@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id C862260133; Mon, 2 Mar 2026 20:25:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64F56C2BCB7; Mon, 2 Mar 2026 20:25:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772483129; bh=Wct+3cAXr2AVkFzE/jVOQWTeoTa9TE6CBNx5sw4yG2k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=h1YsGwEmIJFLW3CzZ5bdaHSN7FOic3MM859XdONpETiRcUDTpTpCOxvJ9o7kNEnO7 /xK5XcGPfUtYFW/ENmFaQRwFKN2R+eXt+h3OPJC/vekUeqpWsoucdwJaurhoY6wzVO PEsBWMWbFFZOMyTLbyN/JqhQP+3fK785gISoZJuIcXKsX0mFgvJJ27zdsZJ0BlJK5k teaWIuCLkXCwdJGli0atBQkG+LG36qpMQrgpykwU1OdGCjYLHgXyy1Ifemkpz96T8a sZGRtWy1O9whUwEJ9/1jSPRCYKDth5+KE/y5ZPAL/oBdCyC0sVwaWk2uzOgJ52necM 9ZJCgMYuXe9cg== From: Jeff Layton Date: Mon, 02 Mar 2026 15:23:46 -0500 Subject: [PATCH v2 002/110] vfs: widen inode hash/lookup functions to u64 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260302-iino-u64-v2-2-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=11795; i=jlayton@kernel.org; h=from:subject:message-id; bh=Wct+3cAXr2AVkFzE/jVOQWTeoTa9TE6CBNx5sw4yG2k=; b=owEBbQKS/ZANAwAKAQAOaEEZVoIVAcsmYgBppfHvU6cVWqbaDIbMAybD3leM/4REmF8fNAzks 1D5ugRb5kGJAjMEAAEKAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCaaXx7wAKCRAADmhBGVaC FSJqEACGVXYgP7S/0O88rguKCt5UBBebX78Yd/Ny0Giz/8gkn6H4ZasyHdat7uciwGrE+vzpfec hDcmtAeU8KV1g0NTzRwMdbt+fUtDf8Axb+dP87wiZi7B9VebDGYSbxtV3919EVAsZLhhPbdZ1wD k6xomTm3YhxIfjzMJoiS8wloIyxavvrGoUlhTsrZHwJGzCMqZut4XIUr6Ea4Mh/f6RQcHb3C60B Z9qcpfp1Kx3z5f4axj+htIopvZQgZOYGZw9xjndBhKxZ7bglSMV/JUKPMwzeZQFDYQc9RyusBfS c43y9CSbqz4uYufv5ONojU30DcquejtK0pqINYNPT4v6pa5l7YFkVKfiiZebzx+dbvGLSvKkcSo C7F1eTT7ra5VIy7WyNwhLJ0hzmj63Th4M1f3NuLFTrC1TWZM5fFO7Clb+D6ISIKUmXTtjkJlrhG 8S4BdTZDc5G/AyI4RkbED0Z2e+E6lkiR11wXAguJqmpvxGH0AfoRpJc/mLdO/LWfdKz4C6EX8pH KQDFX/DtIfpfS1h6opy5lMB75/2+EZB8v5lKtFs5YQubrMeN8V4oasdRh4H1gIn+mS73srj5x/P EmrhJmpvXn5miNTq52vSkkliQA3X3Q+giw7hPUILgdV6WOeYTDX5/jns+ZU/QAAOP5kjKT7SXkB IBB676fZPDoGQRw== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 X-Stat-Signature: rbpstegmgxid6op1hbyt1jnsspkg6nhg X-Rspam-User: X-Rspamd-Queue-Id: C041D14000F X-Rspamd-Server: rspam12 X-HE-Tag: 1772483130-308501 X-HE-Meta: U2FsdGVkX1/VTHVkvJjdpcidkp7h9DwhGD6/1fEkvUn4NsQLbaIx2UwuTJ2UFop0OIx3nK3AqbDrgV4D8DcwahbGuC1uZJHu1A9l6OvT3cRtR9IRbAPwkKKe4ABlKQaQKJ9GDjbHihVK8VxfaO4bf9rav7VaoHn0SlJ6hdx287/1wbvEYIpiQKhh9BfNkT0CCObNm7//VP7qawlIYmM7caOHdq1uhY/7nwSIZvRmp4i+xhXgDtW4l5IxzZcvB11gpNaIrX6g8H3PRrFArzjOfENwTtJaTHA0rvdVfYQpVfOAkh2kAwRHcRN6Yp2+ariXbtIrOnG7v6rU7CxC1iAs0ky6NaEfPkE2CtJiA9QuwHJNdE19po4JiCrZntkTOlq5Qeg26mpbaTW1CLx92+xRP1yRG0rHmBd88X8J78aZnxKPeU2SdBMygXCqvjXEAzWULmOBLypVTxAzZLTwqaVnInfG+q2p+Gar0QaaKoVqgSzVpQRmGfbkx5CGSX0zSmOZnhBk+KCE35505meKRGIPRxCIGv7JgBuHc1m0Vq5QpcMJveNdcbNqYQ8WSYd3jk0Qj4HrqUiOzRLumFhm2YZXgnkVgMMIuGTWZuE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hzQ0yI9sL7zMpB5fOk2pyLM65uekyQw9ONw1SrpONFnp4a4kQaoknZ/xfsS/yssXEmMI0P+HFeZpE+WYQ6UvICTucayANBHbmOgHTt4Ih Sa4xCkK/ cssAe2+SkFv7oQATH1HnQezgBaKTkoUhw2IXpr/fFlO5E9x2t3k2/IntY+K983Y+SdEmSGY/uAwyogrn9FHQpIOQbKHJSOlZsrtnJaBv3FMGRLmpmEQv1LWKootKGlS8N5cw+5x+LKL4Il+UyM5/msR7RGqUO42WPSjCFfAU6h+Ao9GslGAdtte6e62mTI7f3xqOXeCc/UmFm4KFfmVNJZ+rv2/g+w0ObjEJ6vGaa7rHi7cbNgsOA+PWfGRfLgWwpYGl9Zgp5cggcXy+x4oTquHhIr0k/w+1ILpyhyDUIuXzJikfHuR7Fu Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Change the inode hash/lookup VFS API functions to accept u64 parameters instead of unsigned long for inode numbers and hash values. This is preparation for widening i_ino itself to u64, which will allow filesystems to store full 64-bit inode numbers on 32-bit architectures. Since unsigned long implicitly widens to u64 on all architectures, this change is backward-compatible with all existing callers. In dump_mapping(), change the local ino variable to kino_t and use the PRIino format macro, since this variable holds an i_ino value. In init_special_inode(), also switch to PRIino. Signed-off-by: Jeff Layton --- fs/inode.c | 49 ++++++++++++++++++++++++------------------------- include/linux/fs.h | 26 +++++++++++++------------- 2 files changed, 37 insertions(+), 38 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index cc12b68e021b2c97cc88a46ddc736334ecb8edfa..24ab9fa10baf7c885244f23bfccd731efe4a14cc 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -672,7 +672,7 @@ static inline void inode_sb_list_del(struct inode *inode) } } -static unsigned long hash(struct super_block *sb, unsigned long hashval) +static unsigned long hash(struct super_block *sb, u64 hashval) { unsigned long tmp; @@ -685,12 +685,12 @@ static unsigned long hash(struct super_block *sb, unsigned long hashval) /** * __insert_inode_hash - hash an inode * @inode: unhashed inode - * @hashval: unsigned long value used to locate this object in the + * @hashval: u64 value used to locate this object in the * inode_hashtable. * * Add an inode to the inode hash for this superblock. */ -void __insert_inode_hash(struct inode *inode, unsigned long hashval) +void __insert_inode_hash(struct inode *inode, u64 hashval) { struct hlist_head *b = inode_hashtable + hash(inode->i_sb, hashval); @@ -726,7 +726,7 @@ void dump_mapping(const struct address_space *mapping) struct dentry *dentry_ptr; struct dentry dentry; char fname[64] = {}; - unsigned long ino; + kino_t ino; /* * If mapping is an invalid pointer, we don't want to crash @@ -750,14 +750,14 @@ void dump_mapping(const struct address_space *mapping) } if (!dentry_first) { - pr_warn("aops:%ps ino:%lx\n", a_ops, ino); + pr_warn("aops:%ps ino:%" PRIino "x\n", a_ops, ino); return; } dentry_ptr = container_of(dentry_first, struct dentry, d_u.d_alias); if (get_kernel_nofault(dentry, dentry_ptr) || !dentry.d_parent || !dentry.d_name.name) { - pr_warn("aops:%ps ino:%lx invalid dentry:%px\n", + pr_warn("aops:%ps ino:%" PRIino "x invalid dentry:%px\n", a_ops, ino, dentry_ptr); return; } @@ -768,7 +768,7 @@ void dump_mapping(const struct address_space *mapping) * Even if strncpy_from_kernel_nofault() succeeded, * the fname could be unreliable */ - pr_warn("aops:%ps ino:%lx dentry name(?):\"%s\"\n", + pr_warn("aops:%ps ino:%" PRIino "x dentry name(?):\"%s\"\n", a_ops, ino, fname); } @@ -1087,7 +1087,7 @@ static struct inode *find_inode(struct super_block *sb, * iget_locked for details. */ static struct inode *find_inode_fast(struct super_block *sb, - struct hlist_head *head, unsigned long ino, + struct hlist_head *head, u64 ino, bool hash_locked, bool *isnew) { struct inode *inode = NULL; @@ -1301,7 +1301,7 @@ EXPORT_SYMBOL(unlock_two_nondirectories); * Note that both @test and @set are called with the inode_hash_lock held, so * they can't sleep. */ -struct inode *inode_insert5(struct inode *inode, unsigned long hashval, +struct inode *inode_insert5(struct inode *inode, u64 hashval, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *data) { @@ -1378,7 +1378,7 @@ EXPORT_SYMBOL(inode_insert5); * Note that both @test and @set are called with the inode_hash_lock held, so * they can't sleep. */ -struct inode *iget5_locked(struct super_block *sb, unsigned long hashval, +struct inode *iget5_locked(struct super_block *sb, u64 hashval, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *data) { @@ -1408,7 +1408,7 @@ EXPORT_SYMBOL(iget5_locked); * This is equivalent to iget5_locked, except the @test callback must * tolerate the inode not being stable, including being mid-teardown. */ -struct inode *iget5_locked_rcu(struct super_block *sb, unsigned long hashval, +struct inode *iget5_locked_rcu(struct super_block *sb, u64 hashval, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *data) { @@ -1455,7 +1455,7 @@ EXPORT_SYMBOL_GPL(iget5_locked_rcu); * hashed, and with the I_NEW flag set. The file system gets to fill it in * before unlocking it via unlock_new_inode(). */ -struct inode *iget_locked(struct super_block *sb, unsigned long ino) +struct inode *iget_locked(struct super_block *sb, u64 ino) { struct hlist_head *head = inode_hashtable + hash(sb, ino); struct inode *inode; @@ -1527,7 +1527,7 @@ EXPORT_SYMBOL(iget_locked); * * Returns 1 if the inode number is unique, 0 if it is not. */ -static int test_inode_iunique(struct super_block *sb, unsigned long ino) +static int test_inode_iunique(struct super_block *sb, u64 ino) { struct hlist_head *b = inode_hashtable + hash(sb, ino); struct inode *inode; @@ -1616,7 +1616,7 @@ EXPORT_SYMBOL(igrab); * * Note2: @test is called with the inode_hash_lock held, so can't sleep. */ -struct inode *ilookup5_nowait(struct super_block *sb, unsigned long hashval, +struct inode *ilookup5_nowait(struct super_block *sb, u64 hashval, int (*test)(struct inode *, void *), void *data, bool *isnew) { struct hlist_head *head = inode_hashtable + hash(sb, hashval); @@ -1647,7 +1647,7 @@ EXPORT_SYMBOL(ilookup5_nowait); * * Note: @test is called with the inode_hash_lock held, so can't sleep. */ -struct inode *ilookup5(struct super_block *sb, unsigned long hashval, +struct inode *ilookup5(struct super_block *sb, u64 hashval, int (*test)(struct inode *, void *), void *data) { struct inode *inode; @@ -1677,7 +1677,7 @@ EXPORT_SYMBOL(ilookup5); * Search for the inode @ino in the inode cache, and if the inode is in the * cache, the inode is returned with an incremented reference count. */ -struct inode *ilookup(struct super_block *sb, unsigned long ino) +struct inode *ilookup(struct super_block *sb, u64 ino) { struct hlist_head *head = inode_hashtable + hash(sb, ino); struct inode *inode; @@ -1726,8 +1726,8 @@ EXPORT_SYMBOL(ilookup); * very carefully implemented. */ struct inode *find_inode_nowait(struct super_block *sb, - unsigned long hashval, - int (*match)(struct inode *, unsigned long, + u64 hashval, + int (*match)(struct inode *, u64, void *), void *data) { @@ -1773,7 +1773,7 @@ EXPORT_SYMBOL(find_inode_nowait); * * The caller must hold the RCU read lock. */ -struct inode *find_inode_rcu(struct super_block *sb, unsigned long hashval, +struct inode *find_inode_rcu(struct super_block *sb, u64 hashval, int (*test)(struct inode *, void *), void *data) { struct hlist_head *head = inode_hashtable + hash(sb, hashval); @@ -1812,7 +1812,7 @@ EXPORT_SYMBOL(find_inode_rcu); * The caller must hold the RCU read lock. */ struct inode *find_inode_by_ino_rcu(struct super_block *sb, - unsigned long ino) + u64 ino) { struct hlist_head *head = inode_hashtable + hash(sb, ino); struct inode *inode; @@ -1833,7 +1833,7 @@ EXPORT_SYMBOL(find_inode_by_ino_rcu); int insert_inode_locked(struct inode *inode) { struct super_block *sb = inode->i_sb; - ino_t ino = inode->i_ino; + u64 ino = inode->i_ino; struct hlist_head *head = inode_hashtable + hash(sb, ino); bool isnew; @@ -1884,7 +1884,7 @@ int insert_inode_locked(struct inode *inode) } EXPORT_SYMBOL(insert_inode_locked); -int insert_inode_locked4(struct inode *inode, unsigned long hashval, +int insert_inode_locked4(struct inode *inode, u64 hashval, int (*test)(struct inode *, void *), void *data) { struct inode *old; @@ -2641,9 +2641,8 @@ void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev) /* leave it no_open_fops */ break; default: - printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o) for" - " inode %s:%lu\n", mode, inode->i_sb->s_id, - inode->i_ino); + pr_debug("init_special_inode: bogus i_mode (%o) for inode %s:%" PRIino "u\n", + mode, inode->i_sb->s_id, inode->i_ino); break; } } diff --git a/include/linux/fs.h b/include/linux/fs.h index e38bc5ece1f360d679a8f30b8171292f7a65c218..d0c4789838b5852111583a3e4cced88999496e68 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2938,32 +2938,32 @@ static inline int inode_generic_drop(struct inode *inode) extern void d_mark_dontcache(struct inode *inode); extern struct inode *ilookup5_nowait(struct super_block *sb, - unsigned long hashval, int (*test)(struct inode *, void *), + u64 hashval, int (*test)(struct inode *, void *), void *data, bool *isnew); -extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval, +extern struct inode *ilookup5(struct super_block *sb, u64 hashval, int (*test)(struct inode *, void *), void *data); -extern struct inode *ilookup(struct super_block *sb, unsigned long ino); +extern struct inode *ilookup(struct super_block *sb, u64 ino); -extern struct inode *inode_insert5(struct inode *inode, unsigned long hashval, +extern struct inode *inode_insert5(struct inode *inode, u64 hashval, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *data); -struct inode *iget5_locked(struct super_block *, unsigned long, +struct inode *iget5_locked(struct super_block *, u64, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *); -struct inode *iget5_locked_rcu(struct super_block *, unsigned long, +struct inode *iget5_locked_rcu(struct super_block *, u64, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *); -extern struct inode * iget_locked(struct super_block *, unsigned long); +extern struct inode *iget_locked(struct super_block *, u64); extern struct inode *find_inode_nowait(struct super_block *, - unsigned long, + u64, int (*match)(struct inode *, - unsigned long, void *), + u64, void *), void *data); -extern struct inode *find_inode_rcu(struct super_block *, unsigned long, +extern struct inode *find_inode_rcu(struct super_block *, u64, int (*)(struct inode *, void *), void *); -extern struct inode *find_inode_by_ino_rcu(struct super_block *, unsigned long); -extern int insert_inode_locked4(struct inode *, unsigned long, int (*test)(struct inode *, void *), void *); +extern struct inode *find_inode_by_ino_rcu(struct super_block *, u64); +extern int insert_inode_locked4(struct inode *, u64, int (*test)(struct inode *, void *), void *); extern int insert_inode_locked(struct inode *); #ifdef CONFIG_DEBUG_LOCK_ALLOC extern void lockdep_annotate_inode_mutex_key(struct inode *inode); @@ -3018,7 +3018,7 @@ int setattr_should_drop_sgid(struct mnt_idmap *idmap, */ #define alloc_inode_sb(_sb, _cache, _gfp) kmem_cache_alloc_lru(_cache, &_sb->s_inode_lru, _gfp) -extern void __insert_inode_hash(struct inode *, unsigned long hashval); +extern void __insert_inode_hash(struct inode *, u64 hashval); static inline void insert_inode_hash(struct inode *inode) { __insert_inode_hash(inode, inode->i_ino); -- 2.53.0