tree-wide: Assorted spelling fixes
[firefly-linux-kernel-4.4.55.git] / fs / reiserfs / bitmap.c
index 685495707181c7f168ec280e69b72ba3a1bcc230..ecc04b5ede574108f3158755749baf13c4c0456f 100644 (file)
@@ -169,7 +169,7 @@ static int scan_bitmap_block(struct reiserfs_transaction_handle *th,
                        return 0;       // No free blocks in this bitmap
                }
 
-               /* search for a first zero bit -- beggining of a window */
+               /* search for a first zero bit -- beginning of a window */
                *beg = reiserfs_find_next_zero_le_bit
                    ((unsigned long *)(bh->b_data), boundary, *beg);
 
@@ -1277,7 +1277,10 @@ int reiserfs_init_bitmap_cache(struct super_block *sb)
        struct reiserfs_bitmap_info *bitmap;
        unsigned int bmap_nr = reiserfs_bmap_count(sb);
 
+       /* Avoid lock recursion in fault case */
+       reiserfs_write_unlock(sb);
        bitmap = vmalloc(sizeof(*bitmap) * bmap_nr);
+       reiserfs_write_lock(sb);
        if (bitmap == NULL)
                return -ENOMEM;