Merge tag 'fs_for_v6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jack...
[platform/kernel/linux-starfive.git] / kernel / printk / printk_safe.c
index ef0f9a2..6d10927 100644 (file)
@@ -38,13 +38,8 @@ asmlinkage int vprintk(const char *fmt, va_list args)
         * Use the main logbuf even in NMI. But avoid calling console
         * drivers that might have their own locks.
         */
-       if (this_cpu_read(printk_context) || in_nmi()) {
-               int len;
-
-               len = vprintk_store(0, LOGLEVEL_DEFAULT, NULL, fmt, args);
-               defer_console_output();
-               return len;
-       }
+       if (this_cpu_read(printk_context) || in_nmi())
+               return vprintk_deferred(fmt, args);
 
        /* No obstacles. */
        return vprintk_default(fmt, args);