]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
UBUNTU: SAUCE: hio: use alloc_cpumask_var to avoid -Wframe-larger-than
authorKamal Mostafa <kamal@canonical.com>
Thu, 14 Jul 2016 17:57:12 +0000 (10:57 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 5 Sep 2017 12:33:24 +0000 (07:33 -0500)
BugLink: http://bugs.launchpad.net/bugs/1635594
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/1635594
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
ubuntu/hio/hio.c

index c74c2ee30a97a1bd7f5bf11539b69664b4f80c87..4e07f9a90e68bae42573d697f9495646bd1b34cd 100644 (file)
@@ -4769,9 +4769,6 @@ static int ssd_done_thread(void *data)
        struct ssd_device *dev;
        struct bio *bio;
        struct bio *next;
-#ifdef SSD_ESCAPE_IRQ
-       cpumask_t new_mask;
-#endif
 
        if (!data) {
                return -EINVAL;
@@ -4811,10 +4808,14 @@ static int ssd_done_thread(void *data)
 #ifdef SSD_ESCAPE_IRQ
                        if (unlikely(smp_processor_id() == dev->irq_cpu)) {
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-                               cpumask_setall(&new_mask);
-                               cpumask_clear_cpu(dev->irq_cpu, &new_mask);
-                               set_cpus_allowed_ptr(current, &new_mask);
+                               cpumask_var_t new_mask;
+                               alloc_cpumask_var(&new_mask, GFP_ATOMIC);
+                               cpumask_setall(new_mask);
+                               cpumask_clear_cpu(dev->irq_cpu, new_mask);
+                               set_cpus_allowed_ptr(current, new_mask);
+                               free_cpumask_var(new_mask);
 #else
+                               cpumask_t new_mask;
                                cpus_setall(new_mask);
                                cpu_clear(dev->irq_cpu, new_mask);
                                set_cpus_allowed(current, new_mask);
@@ -4831,9 +4832,6 @@ static int ssd_send_thread(void *data)
        struct ssd_device *dev;
        struct bio *bio;
        struct bio *next;
-#ifdef SSD_ESCAPE_IRQ
-       cpumask_t new_mask;
-#endif
 
        if (!data) {
                return -EINVAL;
@@ -4871,10 +4869,14 @@ static int ssd_send_thread(void *data)
 #ifdef SSD_ESCAPE_IRQ
                        if (unlikely(smp_processor_id() == dev->irq_cpu)) {
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-                               cpumask_setall(&new_mask);
-                               cpumask_clear_cpu(dev->irq_cpu, &new_mask);
-                               set_cpus_allowed_ptr(current, &new_mask);
+                               cpumask_var_t new_mask;
+                               alloc_cpumask_var(&new_mask, GFP_ATOMIC);
+                               cpumask_setall(new_mask);
+                               cpumask_clear_cpu(dev->irq_cpu, new_mask);
+                               set_cpus_allowed_ptr(current, new_mask);
+                               free_cpumask_var(new_mask);
 #else
+                               cpumask_t new_mask;
                                cpus_setall(new_mask);
                                cpu_clear(dev->irq_cpu, new_mask);
                                set_cpus_allowed(current, new_mask);