lkml.org 
[lkml]   [2026]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH RFC v2 23/23] fs: stop rewriting kthread fs structs
Now that we isolated kthreads filesystem state completely from userspace
stop rewriting their state.

Signed-off-by: Christian Brauner <brauner@kernel.org>
---
fs/fs_struct.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/fs/fs_struct.c b/fs/fs_struct.c
index c1afa7513e34..74fcee814be3 100644
--- a/fs/fs_struct.c
+++ b/fs/fs_struct.c
@@ -61,6 +61,9 @@ void chroot_fs_refs(const struct path *old_root, const struct path *new_root)

read_lock(&tasklist_lock);
for_each_process_thread(g, p) {
+ if (p->flags & PF_KTHREAD)
+ continue;
+
task_lock(p);
fs = p->fs;
if (fs) {
--
2.47.3


\
 
 \ /
  Last update: 2026-03-06 00:34    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog