Commit 5914811a authored by Björn Steinbrink's avatar Björn Steinbrink Committed by Linus Torvalds

[PATCH] kjournald keeps reference to namespace

In daemonize() a new thread gets cleaned up and 'merged' with init_task.
The current fs_struct is handled there, but not the current namespace.

This adds the namespace part.

[ Eric Biederman pointed out the namespace wrappers, and also notes that
  we can't ever count on using our parents namespace because we already
  have called exit_fs(), which is the only way to the namespace from a
  process. ]
Signed-off-by: default avatarBjörn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: default avatarEric Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6d7b9efa
...@@ -360,6 +360,9 @@ void daemonize(const char *name, ...) ...@@ -360,6 +360,9 @@ void daemonize(const char *name, ...)
fs = init_task.fs; fs = init_task.fs;
current->fs = fs; current->fs = fs;
atomic_inc(&fs->count); atomic_inc(&fs->count);
exit_namespace(current);
current->namespace = init_task.namespace;
get_namespace(current->namespace);
exit_files(current); exit_files(current);
current->files = init_task.files; current->files = init_task.files;
atomic_inc(&current->files->count); atomic_inc(&current->files->count);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment