]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
md: move async_tx_issue_pending_all outside spin_lock_irq
authorDan Williams <dan.j.williams@intel.com>
Wed, 23 Jul 2008 19:05:51 +0000 (12:05 -0700)
committerDan Williams <dan.j.williams@intel.com>
Wed, 23 Jul 2008 19:05:51 +0000 (12:05 -0700)
Some dma drivers need to call spin_lock_bh in their device_issue_pending
routines.  This change avoids:

WARNING: at kernel/softirq.c:136 local_bh_enable_ip+0x3a/0x85()

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/md/raid5.c

index 42a480ba767b6d2618aaba1be2cd3d78970b66f0..8a6f101d32259da10d6dfa599bfa1ddb85822596 100644 (file)
@@ -3809,10 +3809,8 @@ static void raid5d(mddev_t *mddev)
 
                sh = __get_priority_stripe(conf);
 
-               if (!sh) {
-                       async_tx_issue_pending_all();
+               if (!sh)
                        break;
-               }
                spin_unlock_irq(&conf->device_lock);
                
                handled++;
@@ -3825,6 +3823,7 @@ static void raid5d(mddev_t *mddev)
 
        spin_unlock_irq(&conf->device_lock);
 
+       async_tx_issue_pending_all();
        unplug_slaves(mddev);
 
        pr_debug("--- raid5d inactive\n");