Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19992
b: refs/heads/master
c: 99d1419
h: refs/heads/master
v: v3
  • Loading branch information
JANAK DESAI authored and Linus Torvalds committed Feb 8, 2006
1 parent 4c715ed commit dc630c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf2e340f4249b781b3d2beb41e891d08581f0e10
refs/heads/master: 99d1419d96d7df9cfa56bc977810be831bd5ef64
9 changes: 6 additions & 3 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -1371,15 +1371,18 @@ static int unshare_thread(unsigned long unshare_flags)
}

/*
* Unsharing of fs info for tasks created with CLONE_FS is not supported yet
* Unshare the filesystem structure if it is being shared
*/
static int unshare_fs(unsigned long unshare_flags, struct fs_struct **new_fsp)
{
struct fs_struct *fs = current->fs;

if ((unshare_flags & CLONE_FS) &&
(fs && atomic_read(&fs->count) > 1))
return -EINVAL;
(fs && atomic_read(&fs->count) > 1)) {
*new_fsp = __copy_fs_struct(current->fs);
if (!*new_fsp)
return -ENOMEM;
}

return 0;
}
Expand Down

0 comments on commit dc630c0

Please sign in to comment.