linux-stable/fs
Oleg Nesterov 5ffd2c37cb kill do_each_thread()
Eric has pointed out that we still have 3 users of do_each_thread().
Change them to use for_each_process_thread() and kill this helper.

There is a subtle change, after do_each_thread/while_each_thread g == t ==
&init_task, while after for_each_process_thread() they both point to
nowhere, but this doesn't matter.

> Why is for_each_process_thread() better than do_each_thread()?

Say, for_each_process_thread() is rcu safe, do_each_thread() is not.

And certainly

	for_each_process_thread(p, t) {
		do_something(p, t);
	}

looks better than

	do_each_thread(p, t) {
		do_something(p, t);
	} while_each_thread(p, t);

And again, there are only 3 users of this awkward helper left.  It should
have been killed years ago and in fact I thought it had already been
killed.  It uses while_each_thread() which needs some changes.

Link: https://lkml.kernel.org/r/20230817163708.GA8248@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: "Christian Brauner (Microsoft)" <brauner@kernel.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Jiri Slaby <jirislaby@kernel.org> # tty/serial
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-08-21 13:46:25 -07:00
..
9p fs/9p: Remove unused extern declaration 2023-07-20 19:21:48 +00:00
adfs adfs: delete unused "union adfs_dirtail" definition 2023-08-21 13:46:23 -07:00
affs
afs afs: Fix accidental truncation when storing data 2023-07-04 12:24:32 -07:00
autofs arch/*/configs/*defconfig: Replace AUTOFS4_FS by AUTOFS_FS 2023-07-29 14:08:22 -07:00
befs
bfs
btrfs for-6.5-rc3-tag 2023-07-27 11:44:08 -07:00
cachefiles v6.5/vfs.file 2023-06-26 10:14:36 -07:00
ceph ceph: never send metrics if disable_send_metrics is set 2023-07-24 13:15:39 +02:00
coda
configfs
cramfs
crypto
debugfs
devpts
dlm dlm for 6.5 2023-06-29 13:27:50 -07:00
ecryptfs
efivarfs
efs efs: clean up -Wunused-const-variable= warning 2023-08-18 10:18:59 -07:00
erofs erofs: fix fsdax unavailability for chunk-based regular files 2023-07-12 00:50:56 +08:00
exfat
exportfs
ext2 \n 2023-06-29 13:39:51 -07:00
ext4 ext4: fix rbtree traversal bug in ext4_mb_use_preallocated 2023-07-23 08:21:14 -04:00
f2fs f2fs update for 6.5-rc1 2023-07-05 14:14:37 -07:00
fat
freevxfs
fscache
fuse fuse update for 6.5 2023-07-19 11:00:27 -07:00
gfs2 gfs2 fixes 2023-07-04 11:45:16 -07:00
hfs
hfsplus fs: hfsplus: make extend error rate limited 2023-08-18 10:18:55 -07:00
hostfs Landlock updates for v6.5-rc1 2023-06-27 17:10:27 -07:00
hpfs
hugetlbfs hugetlb: revert use of page_cache_next_miss() 2023-06-23 16:59:32 -07:00
iomap iomap: micro optimize the ki_pos assignment in iomap_file_buffered_write 2023-07-17 08:49:57 -07:00
isofs
jbd2 jbd2: remove __journal_try_to_free_buffer() 2023-07-10 23:09:21 -04:00
jffs2 for-6.5/splice-2023-06-23 2023-06-26 11:52:12 -07:00
jfs Minor bug fixes and cleanups 2023-06-29 13:10:32 -07:00
kernfs driver core changes for 6.5-rc1 2023-07-03 12:56:23 -07:00
lockd NFS client updates for Linux 6.5 2023-07-01 14:38:25 -07:00
minix
netfs
nfs NFS client updates for Linux 6.5 2023-07-01 14:38:25 -07:00
nfs_common
nfsd nfsd-6.5 fixes: 2023-07-25 13:54:04 -07:00
nilfs2 nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse 2023-08-21 13:46:25 -07:00
nls fs/nls: make load_nls() take a const parameter 2023-07-25 00:30:02 -05:00
notify fanotify: disallow mount/sb marks on kernel internal pseudo fs 2023-07-04 13:29:29 +02:00
ntfs - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
ntfs3 driver ntfs3 for linux 6.5 2023-07-07 14:59:38 -07:00
ocfs2 fs: ocfs2: namei: check return value of ocfs2_add_entry() 2023-08-18 10:19:00 -07:00
omfs
openpromfs
orangefs
overlayfs ovl: Always reevaluate the file signature for IMA 2023-07-25 15:36:22 -07:00
proc proc/vmcore: fix signedness bug in read_from_oldmem() 2023-07-27 13:07:05 -07:00
pstore pstore updates for v6.5-rc1 2023-06-27 21:21:32 -07:00
qnx4
qnx6
quota
ramfs - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
reiserfs - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
romfs
smb four small client fixes 2023-07-29 20:49:13 -07:00
squashfs squashfs: fix cache race with migration 2023-07-08 09:29:30 -07:00
sysfs sysfs: Skip empty folders creation 2023-06-15 13:37:53 +02:00
sysv for-6.5/splice-2023-06-23 2023-06-26 11:52:12 -07:00
tracefs
ubifs
udf \n 2023-06-29 13:39:51 -07:00
ufs
unicode
vboxsf hardening updates for v6.5-rc1 2023-06-27 21:24:18 -07:00
verity fsverity: improve documentation for builtin signature support 2023-06-20 22:47:55 -07:00
xfs xfs: convert flex-array declarations in xfs attr shortform objects 2023-07-17 08:48:56 -07:00
zonefs - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
Kconfig
Kconfig.binfmt
Makefile for-6.5/block-2023-06-23 2023-06-26 12:47:20 -07:00
aio.c fs/aio: Stop allocating aio rings from HIGHMEM 2023-06-15 09:22:23 +02:00
anon_inodes.c
attr.c
bad_inode.c
binfmt_elf.c Merge branch 'expand-stack' 2023-06-28 20:35:21 -07:00
binfmt_elf_fdpic.c
binfmt_elf_test.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
buffer.c \n 2023-06-29 13:39:51 -07:00
char_dev.c
compat_binfmt_elf.c
coredump.c v6.5/vfs.misc 2023-06-26 09:50:21 -07:00
d_path.c
dax.c dax: enable dax fault handler to report VM_FAULT_HWPOISON 2023-06-26 07:54:23 -06:00
dcache.c
direct-io.c - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
drop_caches.c
eventfd.c eventfd: show the EFD_SEMAPHORE flag in fdinfo 2023-06-15 09:22:23 +02:00
eventpoll.c v6.5/vfs.misc 2023-06-26 09:50:21 -07:00
exec.c kernel/fork: stop playing lockless games for exe_file replacement 2023-08-21 13:46:24 -07:00
fcntl.c
fhandle.c fsnotify: move fsnotify_open() hook into do_dentry_open() 2023-06-12 10:43:45 +02:00
file.c file: always lock position for FMODE_ATOMIC_POS 2023-07-24 10:16:36 -07:00
file_table.c fs: move cleanup from init_file() into its callers 2023-07-02 13:15:49 +02:00
filesystems.c
fs-writeback.c writeback: move wb_over_bg_thresh() call outside lock section 2023-06-09 16:25:14 -07:00
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c kill do_each_thread() 2023-08-21 13:46:25 -07:00
fs_types.c
fsopen.c
init.c
inode.c fs: don't assume arguments are non-NULL 2023-07-04 10:21:11 +02:00
internal.h v6.5/vfs.file 2023-06-26 10:14:36 -07:00
ioctl.c
kernel_read_file.c
libfs.c fs: factor out a direct_write_fallback helper 2023-06-09 16:25:53 -07:00
locks.c
mbcache.c
mnt_idmapping.c
mount.h
mpage.c
namei.c fs: no need to check source 2023-07-04 10:20:29 +02:00
namespace.c v6.5/vfs.mount 2023-06-26 10:27:04 -07:00
nsfs.c
open.c \n 2023-06-29 13:31:44 -07:00
pipe.c
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c readdir: Replace one-element arrays with flexible-array members 2023-06-21 09:06:59 +02:00
remap_range.c
select.c
seq_file.c
signalfd.c
splice.c splice, net: Fix splice_to_socket() for O_NONBLOCK socket 2023-07-26 21:56:06 -07:00
stack.c
stat.c
statfs.c
super.c \n 2023-06-29 13:39:51 -07:00
sync.c
sysctls.c
timerfd.c
userfaultfd.c Merge mm-hotfixes-stable into mm-stable to pick up depended-upon changes. 2023-06-23 16:58:19 -07:00
utimes.c
xattr.c