diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-22 18:42:10 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-26 21:10:00 -0400 |
commit | 864bdb3b6cbd9911222543fef1cfe36f88183f44 (patch) | |
tree | bd00e6293592a084ee0fe68e3acb93060f54ae68 /kernel | |
parent | 2be7fd55d44882c9818ed2d1dabc0f0abab5eeed (diff) |
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/exit.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 20dfc7617c2e..095113321318 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -457,9 +457,7 @@ void daemonize(const char *name, ...) | |||
457 | /* Become as one with the init task */ | 457 | /* Become as one with the init task */ |
458 | 458 | ||
459 | daemonize_fs_struct(); | 459 | daemonize_fs_struct(); |
460 | exit_files(current); | 460 | daemonize_descriptors(); |
461 | current->files = init_task.files; | ||
462 | atomic_inc(¤t->files->count); | ||
463 | 461 | ||
464 | reparent_to_kthreadd(); | 462 | reparent_to_kthreadd(); |
465 | } | 463 | } |