mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
kill daemonize()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
02232f8d2b
commit
c4144670fd
7 changed files with 1 additions and 128 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue