Skip to content

Commit

Permalink
Kill unsharing fs_struct in __set_personality()
Browse files Browse the repository at this point in the history
That's a rudiment of altroot support.  I.e. it should've been buried
a long time ago.

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Apr 1, 2009
1 parent 15f7176 commit 11d06b2
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions kernel/exec_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 11d06b2

Please sign in to comment.