Files
linux/fs
Alexey Dobriyan f7027ed76d proc: rewrite next_tgid()
* deduplicate "iter.tgid += 1" line,
  Right now it is done once inside next_tgid() itself and second time
  inside "for" loop.

* deduplicate next_tgid() call itself with different loop style:

	auto it = make_tgid_iter();
	while (next_tgid(&it)) {
		...
	}

  gcc seems to inline it twice:

  	$ ./scripts/bloat-o-meter ../vmlinux-000 ../obj/vmlinux
	add/remove: 0/1 grow/shrink: 1/0 up/down: 100/-245 (-145)
	Function                                     old     new   delta
	proc_pid_readdir                             531     631    +100
	next_tgid                                    245       -    -245

* make tgid_iter.pid_ns const
  it never changes during readdir anyway

[akpm@linux-foundation.org: remove newline]
Link: https://lore.kernel.org/20260422191745.435556-2-adobriyan@gmail.com
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-05-28 21:24:39 -07:00
..
2026-04-20 17:27:28 +02:00
2026-01-02 13:43:41 -05:00
2026-05-28 21:24:39 -07:00
2025-11-28 12:42:31 +01:00
2026-04-03 16:53:50 -04:00
2026-04-01 12:26:07 -07:00
2026-02-19 21:51:00 +09:00
2026-02-19 21:51:00 +09:00
2026-01-12 16:52:09 +01:00
2026-04-14 09:30:15 +02:00
2026-01-12 16:52:09 +01:00
2026-03-23 12:41:58 +01:00