new helper: daemonize_descriptors()
descriptor-related parts of daemonize, done right. As the result we simplify the locking rules for ->files - we hold task_lock in *all* cases when we modify ->files. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
这个提交包含在:
@@ -457,9 +457,7 @@ void daemonize(const char *name, ...)
|
||||
/* Become as one with the init task */
|
||||
|
||||
daemonize_fs_struct();
|
||||
exit_files(current);
|
||||
current->files = init_task.files;
|
||||
atomic_inc(¤t->files->count);
|
||||
daemonize_descriptors();
|
||||
|
||||
reparent_to_kthreadd();
|
||||
}
|
||||
|
在新工单中引用
屏蔽一个用户