kill daemonize()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2012-10-02 16:34:38 -04:00
parent 02232f8d2b
commit c4144670fd
7 changed files with 1 additions and 128 deletions

View file

@ -164,27 +164,3 @@ struct fs_struct init_fs = {
.seq = SEQCNT_ZERO,
.umask = 0022,
};
void daemonize_fs_struct(void)
{
struct fs_struct *fs = current->fs;
if (fs) {
int kill;
task_lock(current);
spin_lock(&init_fs.lock);
init_fs.users++;
spin_unlock(&init_fs.lock);
spin_lock(&fs->lock);
current->fs = &init_fs;
kill = !--fs->users;
spin_unlock(&fs->lock);
task_unlock(current);
if (kill)
free_fs_struct(fs);
}
}