diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-04-13 12:19:01 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-04-13 12:19:01 -0700 |
| commit | b7d74ea0fdaa8d641fe6f18507c5f0d21b652d53 (patch) | |
| tree | 70c957916719692c4383cf1bec472a84c860dd73 /net | |
| parent | 0f00132132937ca01a99feaf8985109a9087c9ff (diff) | |
| parent | 2e43ca1a4f949e4beb763f8196695da02b17bd77 (diff) | |
| download | lwn-b7d74ea0fdaa8d641fe6f18507c5f0d21b652d53.tar.gz lwn-b7d74ea0fdaa8d641fe6f18507c5f0d21b652d53.zip | |
Merge tag 'vfs-7.1-rc1.kino' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull vfs i_ino updates from Christian Brauner:
"For historical reasons, the inode->i_ino field is an unsigned long,
which means that it's 32 bits on 32 bit architectures. This has caused
a number of filesystems to implement hacks to hash a 64-bit identifier
into a 32-bit field, and deprives us of a universal identifier field
for an inode.
This changes the inode->i_ino field from an unsigned long to a u64.
This shouldn't make any material difference on 64-bit hosts, but
32-bit hosts will see struct inode grow by at least 4 bytes. This
could have effects on slabcache sizes and field alignment.
The bulk of the changes are to format strings and tracepoints, since
the kernel itself doesn't care that much about the i_ino field. The
first patch changes some vfs function arguments, so check that one out
carefully.
With this change, we may be able to shrink some inode structures. For
instance, struct nfs_inode has a fileid field that holds the 64-bit
inode number. With this set of changes, that field could be
eliminated. I'd rather leave that sort of cleanups for later just to
keep this simple"
* tag 'vfs-7.1-rc1.kino' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
nilfs2: fix 64-bit division operations in nilfs_bmap_find_target_in_group()
EVM: add comment describing why ino field is still unsigned long
vfs: remove externs from fs.h on functions modified by i_ino widening
treewide: fix missed i_ino format specifier conversions
ext4: fix signed format specifier in ext4_load_inode trace event
treewide: change inode->i_ino from unsigned long to u64
nilfs2: widen trace event i_ino fields to u64
f2fs: widen trace event i_ino fields to u64
ext4: widen trace event i_ino fields to u64
zonefs: widen trace event i_ino fields to u64
hugetlbfs: widen trace event i_ino fields to u64
ext2: widen trace event i_ino fields to u64
cachefiles: widen trace event i_ino fields to u64
vfs: widen trace event i_ino fields to u64
net: change sock.sk_ino and sock_i_ino() to u64
audit: widen ino fields to u64
vfs: widen inode hash/lookup functions to u64
Diffstat (limited to 'net')
| -rw-r--r-- | net/ax25/af_ax25.c | 2 | ||||
| -rw-r--r-- | net/bluetooth/af_bluetooth.c | 4 | ||||
| -rw-r--r-- | net/can/bcm.c | 2 | ||||
| -rw-r--r-- | net/ipv4/ping.c | 2 | ||||
| -rw-r--r-- | net/ipv4/raw.c | 2 | ||||
| -rw-r--r-- | net/ipv4/tcp_ipv4.c | 2 | ||||
| -rw-r--r-- | net/ipv4/udp.c | 2 | ||||
| -rw-r--r-- | net/ipv6/datagram.c | 2 | ||||
| -rw-r--r-- | net/ipv6/tcp_ipv6.c | 2 | ||||
| -rw-r--r-- | net/key/af_key.c | 2 | ||||
| -rw-r--r-- | net/netlink/af_netlink.c | 2 | ||||
| -rw-r--r-- | net/netlink/diag.c | 2 | ||||
| -rw-r--r-- | net/netrom/af_netrom.c | 4 | ||||
| -rw-r--r-- | net/packet/af_packet.c | 2 | ||||
| -rw-r--r-- | net/packet/diag.c | 2 | ||||
| -rw-r--r-- | net/phonet/socket.c | 4 | ||||
| -rw-r--r-- | net/rose/af_rose.c | 4 | ||||
| -rw-r--r-- | net/sctp/proc.c | 4 | ||||
| -rw-r--r-- | net/socket.c | 2 | ||||
| -rw-r--r-- | net/unix/af_unix.c | 2 | ||||
| -rw-r--r-- | net/unix/diag.c | 6 | ||||
| -rw-r--r-- | net/x25/x25_proc.c | 4 | ||||
| -rw-r--r-- | net/xdp/xsk_diag.c | 2 |
23 files changed, 31 insertions, 31 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index a76f4793aed2..9d236e64f5f5 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -1986,7 +1986,7 @@ static int ax25_info_show(struct seq_file *seq, void *v) ax25->paclen); if (ax25->sk != NULL) { - seq_printf(seq, " %d %d %lu\n", + seq_printf(seq, " %d %d %llu\n", sk_wmem_alloc_get(ax25->sk), sk_rmem_alloc_get(ax25->sk), sock_i_ino(ax25->sk)); diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index 2b94e2077203..33d053d63407 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c @@ -817,14 +817,14 @@ static int bt_seq_show(struct seq_file *seq, void *v) struct bt_sock *bt = bt_sk(sk); seq_printf(seq, - "%pK %-6d %-6u %-6u %-6u %-6lu %-6lu", + "%pK %-6d %-6u %-6u %-6u %-6llu %-6llu", sk, refcount_read(&sk->sk_refcnt), sk_rmem_alloc_get(sk), sk_wmem_alloc_get(sk), from_kuid(seq_user_ns(seq), sk_uid(sk)), sock_i_ino(sk), - bt->parent ? sock_i_ino(bt->parent) : 0LU); + bt->parent ? sock_i_ino(bt->parent) : 0ULL); if (l->custom_seq_show) { seq_putc(seq, ' '); diff --git a/net/can/bcm.c b/net/can/bcm.c index fd9fa072881e..5a4801699250 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c @@ -1713,7 +1713,7 @@ static int bcm_connect(struct socket *sock, struct sockaddr_unsized *uaddr, int #if IS_ENABLED(CONFIG_PROC_FS) if (net->can.bcmproc_dir) { /* unique socket address as filename */ - sprintf(bo->procname, "%lu", sock_i_ino(sk)); + sprintf(bo->procname, "%llu", sock_i_ino(sk)); bo->bcm_proc_read = proc_create_net_single(bo->procname, 0644, net->can.bcmproc_dir, bcm_proc_show, sk); diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 71d5e17719de..bc4b43e52303 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -1111,7 +1111,7 @@ static void ping_v4_format_sock(struct sock *sp, struct seq_file *f, __u16 srcp = ntohs(inet->inet_sport); seq_printf(f, "%5d: %08X:%04X %08X:%04X" - " %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %u", + " %02X %08X:%08X %02X:%08lX %08X %5u %8d %llu %d %pK %u", bucket, src, srcp, dest, destp, sp->sk_state, sk_wmem_alloc_get(sp), sk_rmem_alloc_get(sp), diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index e20c41206e29..bcc99ced1ade 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -1041,7 +1041,7 @@ static void raw_sock_seq_show(struct seq_file *seq, struct sock *sp, int i) srcp = inet->inet_num; seq_printf(seq, "%4d: %08X:%04X %08X:%04X" - " %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %u\n", + " %02X %08X:%08X %02X:%08lX %08X %5u %8d %llu %d %pK %u\n", i, src, srcp, dest, destp, sp->sk_state, sk_wmem_alloc_get(sp), sk_rmem_alloc_get(sp), diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index c7b2463c2e25..3b9826d89953 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -2887,7 +2887,7 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i) READ_ONCE(tp->copied_seq), 0); seq_printf(f, "%4d: %08X:%04X %08X:%04X %02X %08X:%08X %02X:%08lX " - "%08X %5u %8d %lu %d %pK %lu %lu %u %u %d", + "%08X %5u %8d %llu %d %pK %lu %lu %u %u %d", i, src, srcp, dest, destp, state, READ_ONCE(tp->write_seq) - tp->snd_una, rx_queue, diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index cb99a3c27053..05a53f7aef33 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -3433,7 +3433,7 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f, __u16 srcp = ntohs(inet->inet_sport); seq_printf(f, "%5d: %08X:%04X %08X:%04X" - " %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %u", + " %02X %08X:%08X %02X:%08lX %08X %5u %8d %llu %d %pK %u", bucket, src, srcp, dest, destp, sp->sk_state, sk_wmem_alloc_get(sp), udp_rqueue_get(sp), diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index 993e2d76fc1f..2d7b59732f7e 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c @@ -1065,7 +1065,7 @@ void __ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp, src = &sp->sk_v6_rcv_saddr; seq_printf(seq, "%5d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X " - "%02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %u\n", + "%02X %08X:%08X %02X:%08lX %08X %5u %8d %llu %d %pK %u\n", bucket, src->s6_addr32[0], src->s6_addr32[1], src->s6_addr32[2], src->s6_addr32[3], srcp, diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index bb09d5ccf599..823bf4fff963 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -2173,7 +2173,7 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i) seq_printf(seq, "%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X " - "%02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %lu %lu %u %u %d\n", + "%02X %08X:%08X %02X:%08lX %08X %5u %8d %llu %d %pK %lu %lu %u %u %d\n", i, src->s6_addr32[0], src->s6_addr32[1], src->s6_addr32[2], src->s6_addr32[3], srcp, diff --git a/net/key/af_key.c b/net/key/af_key.c index 5d480ae39405..a166a88d8788 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -3804,7 +3804,7 @@ static int pfkey_seq_show(struct seq_file *f, void *v) if (v == SEQ_START_TOKEN) seq_printf(f ,"sk RefCnt Rmem Wmem User Inode\n"); else - seq_printf(f, "%pK %-6d %-6u %-6u %-6u %-6lu\n", + seq_printf(f, "%pK %-6d %-6u %-6u %-6u %-6llu\n", s, refcount_read(&s->sk_refcnt), sk_rmem_alloc_get(s), diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 4d609d5cf406..aba847902be5 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -2700,7 +2700,7 @@ static int netlink_native_seq_show(struct seq_file *seq, void *v) struct sock *s = v; struct netlink_sock *nlk = nlk_sk(s); - seq_printf(seq, "%pK %-3d %-10u %08x %-8d %-8d %-5d %-8d %-8u %-8lu\n", + seq_printf(seq, "%pK %-3d %-10u %08x %-8d %-8d %-5d %-8d %-8u %-8llu\n", s, s->sk_protocol, nlk->portid, diff --git a/net/netlink/diag.c b/net/netlink/diag.c index 1dfc340736b8..0b3e021bd0ed 100644 --- a/net/netlink/diag.c +++ b/net/netlink/diag.c @@ -43,7 +43,7 @@ static int sk_diag_put_flags(struct sock *sk, struct sk_buff *skb) static int sk_diag_fill(struct sock *sk, struct sk_buff *skb, struct netlink_diag_req *req, - u32 portid, u32 seq, u32 flags, int sk_ino) + u32 portid, u32 seq, u32 flags, u64 sk_ino) { struct nlmsghdr *nlh; struct netlink_diag_msg *rep; diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index b816c56124ab..5fc54836dfa8 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c @@ -1305,7 +1305,7 @@ static int nr_info_show(struct seq_file *seq, void *v) seq_printf(seq, "%-9s ", ax2asc(buf, &nr->user_addr)); seq_printf(seq, "%-9s ", ax2asc(buf, &nr->dest_addr)); seq_printf(seq, -"%-9s %-3s %02X/%02X %02X/%02X %2d %3d %3d %3d %3lu/%03lu %2lu/%02lu %3lu/%03lu %3lu/%03lu %2d/%02d %3d %5d %5d %ld\n", +"%-9s %-3s %02X/%02X %02X/%02X %2d %3d %3d %3d %3lu/%03lu %2lu/%02lu %3lu/%03lu %3lu/%03lu %2d/%02d %3d %5d %5d %llu\n", ax2asc(buf, &nr->source_addr), devname, nr->my_index, @@ -1329,7 +1329,7 @@ static int nr_info_show(struct seq_file *seq, void *v) nr->window, sk_wmem_alloc_get(s), sk_rmem_alloc_get(s), - s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L); + s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : (u64)0); bh_unlock_sock(s); } diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index bb2d88205e5a..f642a95996e1 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -4722,7 +4722,7 @@ static int packet_seq_show(struct seq_file *seq, void *v) const struct packet_sock *po = pkt_sk(s); seq_printf(seq, - "%pK %-6d %-4d %04x %-5d %1d %-6u %-6u %-6lu\n", + "%pK %-6d %-4d %04x %-5d %1d %-6u %-6u %-6llu\n", s, refcount_read(&s->sk_refcnt), s->sk_type, diff --git a/net/packet/diag.c b/net/packet/diag.c index c8f43e0c1925..cee773f46571 100644 --- a/net/packet/diag.c +++ b/net/packet/diag.c @@ -130,7 +130,7 @@ static int sk_diag_fill(struct sock *sk, struct sk_buff *skb, struct packet_diag_req *req, bool may_report_filterinfo, struct user_namespace *user_ns, - u32 portid, u32 seq, u32 flags, int sk_ino) + u32 portid, u32 seq, u32 flags, u64 sk_ino) { struct nlmsghdr *nlh; struct packet_diag_msg *rp; diff --git a/net/phonet/socket.c b/net/phonet/socket.c index 4423d483c630..c4af26357144 100644 --- a/net/phonet/socket.c +++ b/net/phonet/socket.c @@ -579,7 +579,7 @@ static int pn_sock_seq_show(struct seq_file *seq, void *v) struct sock *sk = v; struct pn_sock *pn = pn_sk(sk); - seq_printf(seq, "%2d %04X:%04X:%02X %02X %08X:%08X %5d %lu " + seq_printf(seq, "%2d %04X:%04X:%02X %02X %08X:%08X %5d %llu " "%d %pK %u", sk->sk_protocol, pn->sobject, pn->dobject, pn->resource, sk->sk_state, @@ -754,7 +754,7 @@ static int pn_res_seq_show(struct seq_file *seq, void *v) struct sock *sk = rcu_dereference_protected(*psk, lockdep_is_held(&resource_mutex)); - seq_printf(seq, "%02X %5u %lu", + seq_printf(seq, "%02X %5u %llu", (int) (psk - pnres.sk), from_kuid_munged(seq_user_ns(seq), sk_uid(sk)), sock_i_ino(sk)); diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index ba56213e0a2a..d5032840ee48 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c @@ -1484,7 +1484,7 @@ static int rose_info_show(struct seq_file *seq, void *v) callsign = ax2asc(buf, &rose->source_call); seq_printf(seq, - "%-10s %-9s %-5s %3.3X %05d %d %d %d %d %3lu %3lu %3lu %3lu %3lu %3lu/%03lu %5d %5d %ld\n", + "%-10s %-9s %-5s %3.3X %05d %d %d %d %d %3lu %3lu %3lu %3lu %3lu %3lu/%03lu %5d %5d %llu\n", rose2asc(rsbuf, &rose->source_addr), callsign, devname, @@ -1503,7 +1503,7 @@ static int rose_info_show(struct seq_file *seq, void *v) rose->idle / (60 * HZ), sk_wmem_alloc_get(s), sk_rmem_alloc_get(s), - s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L); + s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : (u64)0); } return 0; diff --git a/net/sctp/proc.c b/net/sctp/proc.c index 1ed281f3c355..43433d7e2acd 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c @@ -174,7 +174,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v) sk = ep->base.sk; if (!net_eq(sock_net(sk), seq_file_net(seq))) continue; - seq_printf(seq, "%8pK %8pK %-3d %-3d %-4d %-5d %5u %5lu ", ep, sk, + seq_printf(seq, "%8pK %8pK %-3d %-3d %-4d %-5d %5u %5llu ", ep, sk, sctp_sk(sk)->type, sk->sk_state, hash, ep->base.bind_addr.port, from_kuid_munged(seq_user_ns(seq), sk_uid(sk)), @@ -261,7 +261,7 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v) seq_printf(seq, "%8pK %8pK %-3d %-3d %-2d %-4d " - "%4d %8d %8d %7u %5lu %-5d %5d ", + "%4d %8d %8d %7u %5llu %-5d %5d ", assoc, sk, sctp_sk(sk)->type, sk->sk_state, assoc->state, 0, assoc->assoc_id, diff --git a/net/socket.c b/net/socket.c index d25be67e4b84..89ad750ea536 100644 --- a/net/socket.c +++ b/net/socket.c @@ -399,7 +399,7 @@ static const struct super_operations sockfs_ops = { */ static char *sockfs_dname(struct dentry *dentry, char *buffer, int buflen) { - return dynamic_dname(buffer, buflen, "socket:[%lu]", + return dynamic_dname(buffer, buflen, "socket:[%llu]", d_inode(dentry)->i_ino); } diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index b23c33df8b46..0b0e58dd75fc 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -3539,7 +3539,7 @@ static int unix_seq_show(struct seq_file *seq, void *v) struct unix_sock *u = unix_sk(s); unix_state_lock(s); - seq_printf(seq, "%pK: %08X %08X %08X %04X %02X %5lu", + seq_printf(seq, "%pK: %08X %08X %08X %04X %02X %5llu", s, refcount_read(&s->sk_refcnt), 0, diff --git a/net/unix/diag.c b/net/unix/diag.c index c9c1e51c4419..cca7dea05370 100644 --- a/net/unix/diag.c +++ b/net/unix/diag.c @@ -50,7 +50,7 @@ static int sk_diag_dump_vfs(struct sock *sk, struct sk_buff *nlskb) static int sk_diag_dump_peer(struct sock *sk, struct sk_buff *nlskb) { struct sock *peer; - int ino; + u64 ino; peer = unix_peer_get(sk); if (peer) { @@ -117,7 +117,7 @@ static int sk_diag_dump_uid(struct sock *sk, struct sk_buff *nlskb, static int sk_diag_fill(struct sock *sk, struct sk_buff *skb, struct unix_diag_req *req, struct user_namespace *user_ns, - u32 portid, u32 seq, u32 flags, int sk_ino) + u32 portid, u32 seq, u32 flags, u64 sk_ino) { struct nlmsghdr *nlh; struct unix_diag_msg *rep; @@ -191,7 +191,7 @@ static int unix_diag_dump(struct sk_buff *skb, struct netlink_callback *cb) num = 0; spin_lock(&net->unx.table.locks[slot]); sk_for_each(sk, &net->unx.table.buckets[slot]) { - int sk_ino; + u64 sk_ino; if (num < s_num) goto next; diff --git a/net/x25/x25_proc.c b/net/x25/x25_proc.c index 0412814a2295..7e0dbff8f538 100644 --- a/net/x25/x25_proc.c +++ b/net/x25/x25_proc.c @@ -96,7 +96,7 @@ static int x25_seq_socket_show(struct seq_file *seq, void *v) devname = x25->neighbour->dev->name; seq_printf(seq, "%-10s %-10s %-5s %3.3X %d %d %d %d %3lu %3lu " - "%3lu %3lu %3lu %5d %5d %ld\n", + "%3lu %3lu %3lu %5d %5d %llu\n", !x25->dest_addr.x25_addr[0] ? "*" : x25->dest_addr.x25_addr, !x25->source_addr.x25_addr[0] ? "*" : x25->source_addr.x25_addr, devname, x25->lci & 0x0FFF, x25->state, x25->vs, x25->vr, @@ -104,7 +104,7 @@ static int x25_seq_socket_show(struct seq_file *seq, void *v) x25->t21 / HZ, x25->t22 / HZ, x25->t23 / HZ, sk_wmem_alloc_get(s), sk_rmem_alloc_get(s), - s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L); + s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : (u64)0); out: return 0; } diff --git a/net/xdp/xsk_diag.c b/net/xdp/xsk_diag.c index 0e0bca031c03..0170363eb542 100644 --- a/net/xdp/xsk_diag.c +++ b/net/xdp/xsk_diag.c @@ -92,7 +92,7 @@ static int xsk_diag_put_stats(const struct xdp_sock *xs, struct sk_buff *nlskb) static int xsk_diag_fill(struct sock *sk, struct sk_buff *nlskb, struct xdp_diag_req *req, struct user_namespace *user_ns, - u32 portid, u32 seq, u32 flags, int sk_ino) + u32 portid, u32 seq, u32 flags, u64 sk_ino) { struct xdp_sock *xs = xdp_sk(sk); struct xdp_diag_msg *msg; |
