summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-03-30 11:45:36 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2009-04-01 05:00:25 +0200
commit11d06b2a1e5658f448a308aa3beb97bacd64a940 (patch)
tree5e6fdad704151ac54eb60a5ea5de7a6e5f79112e
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 (diff)
downloadlinux-11d06b2a1e5658f448a308aa3beb97bacd64a940.tar.xz
linux-11d06b2a1e5658f448a308aa3beb97bacd64a940.zip
Kill unsharing fs_struct in __set_personality()
That's a rudiment of altroot support. I.e. it should've been buried a long time ago. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--kernel/exec_domain.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c
index 667c841c2952..cb8e9626c215 100644
--- a/kernel/exec_domain.c
+++ b/kernel/exec_domain.c
@@ -145,28 +145,6 @@ __set_personality(u_long personality)
return 0;
}
- if (atomic_read(&current->fs->count) != 1) {
- struct fs_struct *fsp, *ofsp;
-
- fsp = copy_fs_struct(current->fs);
- if (fsp == NULL) {
- module_put(ep->module);
- return -ENOMEM;
- }
-
- task_lock(current);
- ofsp = current->fs;
- current->fs = fsp;
- task_unlock(current);
-
- put_fs_struct(ofsp);
- }
-
- /*
- * At that point we are guaranteed to be the sole owner of
- * current->fs.
- */
-
current->personality = personality;
oep = current_thread_info()->exec_domain;
current_thread_info()->exec_domain = ep;