aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 98b450876f93..856eac3ec52e 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -752,13 +752,13 @@ static int copy_fs(unsigned long clone_flags, struct task_struct *tsk)
752 struct fs_struct *fs = current->fs; 752 struct fs_struct *fs = current->fs;
753 if (clone_flags & CLONE_FS) { 753 if (clone_flags & CLONE_FS) {
754 /* tsk->fs is already what we want */ 754 /* tsk->fs is already what we want */
755 write_lock(&fs->lock); 755 spin_lock(&fs->lock);
756 if (fs->in_exec) { 756 if (fs->in_exec) {
757 write_unlock(&fs->lock); 757 spin_unlock(&fs->lock);
758 return -EAGAIN; 758 return -EAGAIN;
759 } 759 }
760 fs->users++; 760 fs->users++;
761 write_unlock(&fs->lock); 761 spin_unlock(&fs->lock);
762 return 0; 762 return 0;
763 } 763 }
764 tsk->fs = copy_fs_struct(fs); 764 tsk->fs = copy_fs_struct(fs);
@@ -1676,13 +1676,13 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
1676 1676
1677 if (new_fs) { 1677 if (new_fs) {
1678 fs = current->fs; 1678 fs = current->fs;
1679 write_lock(&fs->lock); 1679 spin_lock(&fs->lock);
1680 current->fs = new_fs; 1680 current->fs = new_fs;
1681 if (--fs->users) 1681 if (--fs->users)
1682 new_fs = NULL; 1682 new_fs = NULL;
1683 else 1683 else
1684 new_fs = fs; 1684 new_fs = fs;
1685 write_unlock(&fs->lock); 1685 spin_unlock(&fs->lock);
1686 } 1686 }
1687 1687
1688 if (new_mm) { 1688 if (new_mm) {