proc: proc_skip_spaces() shouldn't think it is working on C strings
[platform/kernel/linux-starfive.git] / kernel / kexec_file.c
index 1d546dc..4563751 100644 (file)
@@ -339,7 +339,7 @@ SYSCALL_DEFINE5(kexec_file_load, int, kernel_fd, int, initrd_fd,
 
        image = NULL;
 
-       if (!mutex_trylock(&kexec_mutex))
+       if (!kexec_trylock())
                return -EBUSY;
 
        dest_image = &kexec_image;
@@ -411,7 +411,7 @@ out:
        if ((flags & KEXEC_FILE_ON_CRASH) && kexec_crash_image)
                arch_kexec_protect_crashkres();
 
-       mutex_unlock(&kexec_mutex);
+       kexec_unlock();
        kimage_free(image);
        return ret;
 }