diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-02 16:34:38 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-28 21:49:02 -0500 |
commit | c4144670fd9b34d6eae22c9f83751745898e8243 (patch) | |
tree | da0bbda5707fafdc1d79eb2c851835c777182e89 /fs/fs_struct.c | |
parent | 02232f8d2b22708f0651dc515544f4a7ef1e0224 (diff) |
kill daemonize()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fs_struct.c')
-rw-r--r-- | fs/fs_struct.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/fs/fs_struct.c b/fs/fs_struct.c index 5df4775fea0..fe6ca583bbc 100644 --- a/fs/fs_struct.c +++ b/fs/fs_struct.c | |||
@@ -164,27 +164,3 @@ struct fs_struct init_fs = { | |||
164 | .seq = SEQCNT_ZERO, | 164 | .seq = SEQCNT_ZERO, |
165 | .umask = 0022, | 165 | .umask = 0022, |
166 | }; | 166 | }; |
167 | |||
168 | void daemonize_fs_struct(void) | ||
169 | { | ||
170 | struct fs_struct *fs = current->fs; | ||
171 | |||
172 | if (fs) { | ||
173 | int kill; | ||
174 | |||
175 | task_lock(current); | ||
176 | |||
177 | spin_lock(&init_fs.lock); | ||
178 | init_fs.users++; | ||
179 | spin_unlock(&init_fs.lock); | ||
180 | |||
181 | spin_lock(&fs->lock); | ||
182 | current->fs = &init_fs; | ||
183 | kill = !--fs->users; | ||
184 | spin_unlock(&fs->lock); | ||
185 | |||
186 | task_unlock(current); | ||
187 | if (kill) | ||
188 | free_fs_struct(fs); | ||
189 | } | ||
190 | } | ||