]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/md/md-bitmap.c
Merge branches 'pm-sleep', 'pm-cpuidle', 'pm-cpufreq', 'pm-devfreq' and 'pm-avs'
[linux.git] / drivers / md / md-bitmap.c
index b092c7b5282f9608553e19dd36389b4e671df042..3ad18246fcb3c1aba6cd98b69a57b7d40bcf099e 100644 (file)
@@ -2139,6 +2139,7 @@ int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks,
                memcpy(page_address(store.sb_page),
                       page_address(bitmap->storage.sb_page),
                       sizeof(bitmap_super_t));
+       spin_lock_irq(&bitmap->counts.lock);
        md_bitmap_file_unmap(&bitmap->storage);
        bitmap->storage = store;
 
@@ -2154,7 +2155,6 @@ int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks,
        blocks = min(old_counts.chunks << old_counts.chunkshift,
                     chunks << chunkshift);
 
-       spin_lock_irq(&bitmap->counts.lock);
        /* For cluster raid, need to pre-allocate bitmap */
        if (mddev_is_clustered(bitmap->mddev)) {
                unsigned long page;