]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - kernel/fork.c
of: fix CONFIG_OF=n prototype of of_node_full_name()
[karo-tx-linux.git] / kernel / fork.c
index bc0e96b78dfd4a518740cfadb569e80257848051..54a8d26f612f76f17cfb883e29786df98a9de0e0 100644 (file)
@@ -73,6 +73,7 @@
 #include <linux/signalfd.h>
 #include <linux/uprobes.h>
 #include <linux/aio.h>
+#include <linux/compiler.h>
 
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
@@ -286,7 +287,7 @@ void __init fork_init(unsigned long mempages)
                init_task.signal->rlim[RLIMIT_NPROC];
 }
 
-int __attribute__((weak)) arch_dup_task_struct(struct task_struct *dst,
+int __weak arch_dup_task_struct(struct task_struct *dst,
                                               struct task_struct *src)
 {
        *dst = *src;
@@ -1080,15 +1081,6 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
        return 0;
 }
 
-static void copy_flags(unsigned long clone_flags, struct task_struct *p)
-{
-       unsigned long new_flags = p->flags;
-
-       new_flags &= ~(PF_SUPERPRIV | PF_WQ_WORKER);
-       new_flags |= PF_FORKNOEXEC;
-       p->flags = new_flags;
-}
-
 SYSCALL_DEFINE1(set_tid_address, int __user *, tidptr)
 {
        current->clear_child_tid = tidptr;
@@ -1238,7 +1230,8 @@ static struct task_struct *copy_process(unsigned long clone_flags,
                goto bad_fork_cleanup_count;
 
        delayacct_tsk_init(p);  /* Must remain after dup_task_struct() */
-       copy_flags(clone_flags, p);
+       p->flags &= ~(PF_SUPERPRIV | PF_WQ_WORKER);
+       p->flags |= PF_FORKNOEXEC;
        INIT_LIST_HEAD(&p->children);
        INIT_LIST_HEAD(&p->sibling);
        rcu_copy_process(p);
@@ -1284,7 +1277,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
                p->mempolicy = NULL;
                goto bad_fork_cleanup_threadgroup_lock;
        }
-       mpol_fix_fork_child_flag(p);
 #endif
 #ifdef CONFIG_CPUSETS
        p->cpuset_mem_spread_rotor = NUMA_NO_NODE;