Btrfs: Fix compile warnings on 32 bit machines
[linux-2.6-block.git] / fs / btrfs / volumes.c
index 7db4cfd03a98bd5697e851c4113ee9e74c43af4c..80a27284dbf16c257c22c2f275617c191b2ce939 100644 (file)
@@ -58,14 +58,12 @@ void btrfs_unlock_volumes(void)
 
 static void lock_chunks(struct btrfs_root *root)
 {
-       mutex_lock(&root->fs_info->alloc_mutex);
        mutex_lock(&root->fs_info->chunk_mutex);
 }
 
 static void unlock_chunks(struct btrfs_root *root)
 {
        mutex_unlock(&root->fs_info->chunk_mutex);
-       mutex_unlock(&root->fs_info->alloc_mutex);
 }
 
 int btrfs_cleanup_fs_uuids(void)
@@ -202,7 +200,8 @@ loop:
                 * is now congested.  Back off and let other work structs
                 * run instead
                 */
-               if (pending && bdi_write_congested(bdi)) {
+               if (pending && bdi_write_congested(bdi) &&
+                   fs_info->fs_devices->open_devices > 1) {
                        struct bio *old_head;
 
                        spin_lock(&device->io_lock);