Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-arm64.git] / arch / x86 / kernel / cpu / mcheck / mce.c
index 6bc15ed..7bc1263 100644 (file)
@@ -512,11 +512,8 @@ int mce_available(struct cpuinfo_x86 *c)
 
 static void mce_schedule_work(void)
 {
-       if (!mce_ring_empty()) {
-               struct work_struct *work = &__get_cpu_var(mce_work);
-               if (!work_pending(work))
-                       schedule_work(work);
-       }
+       if (!mce_ring_empty())
+               schedule_work(&__get_cpu_var(mce_work));
 }
 
 DEFINE_PER_CPU(struct irq_work, mce_irq_work);
@@ -1351,12 +1348,7 @@ int mce_notify_irq(void)
                /* wake processes polling /dev/mcelog */
                wake_up_interruptible(&mce_chrdev_wait);
 
-               /*
-                * There is no risk of missing notifications because
-                * work_pending is always cleared before the function is
-                * executed.
-                */
-               if (mce_helper[0] && !work_pending(&mce_trigger_work))
+               if (mce_helper[0])
                        schedule_work(&mce_trigger_work);
 
                if (__ratelimit(&ratelimit))