Merge tag 'csky-for-linus-4.20' of https://github.com/c-sky/csky-linux
[platform/kernel/linux-rpi.git] / kernel / pid.c
index de1cfc4..cdf63e5 100644 (file)
@@ -195,7 +195,7 @@ struct pid *alloc_pid(struct pid_namespace *ns)
                idr_preload_end();
 
                if (nr < 0) {
-                       retval = nr;
+                       retval = (nr == -ENOSPC) ? -EAGAIN : nr;
                        goto out_free;
                }