diff options
Diffstat (limited to 'fs/reiserfs/bitmap.c')
-rw-r--r-- | fs/reiserfs/bitmap.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c index 685495707181..483442e66ed6 100644 --- a/fs/reiserfs/bitmap.c +++ b/fs/reiserfs/bitmap.c | |||
@@ -169,7 +169,7 @@ static int scan_bitmap_block(struct reiserfs_transaction_handle *th, | |||
169 | return 0; // No free blocks in this bitmap | 169 | return 0; // No free blocks in this bitmap |
170 | } | 170 | } |
171 | 171 | ||
172 | /* search for a first zero bit -- beggining of a window */ | 172 | /* search for a first zero bit -- beginning of a window */ |
173 | *beg = reiserfs_find_next_zero_le_bit | 173 | *beg = reiserfs_find_next_zero_le_bit |
174 | ((unsigned long *)(bh->b_data), boundary, *beg); | 174 | ((unsigned long *)(bh->b_data), boundary, *beg); |
175 | 175 | ||
@@ -425,7 +425,7 @@ static void _reiserfs_free_block(struct reiserfs_transaction_handle *th, | |||
425 | 425 | ||
426 | journal_mark_dirty(th, s, sbh); | 426 | journal_mark_dirty(th, s, sbh); |
427 | if (for_unformatted) | 427 | if (for_unformatted) |
428 | vfs_dq_free_block_nodirty(inode, 1); | 428 | dquot_free_block_nodirty(inode, 1); |
429 | } | 429 | } |
430 | 430 | ||
431 | void reiserfs_free_block(struct reiserfs_transaction_handle *th, | 431 | void reiserfs_free_block(struct reiserfs_transaction_handle *th, |
@@ -1049,7 +1049,7 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start | |||
1049 | amount_needed, hint->inode->i_uid); | 1049 | amount_needed, hint->inode->i_uid); |
1050 | #endif | 1050 | #endif |
1051 | quota_ret = | 1051 | quota_ret = |
1052 | vfs_dq_alloc_block_nodirty(hint->inode, amount_needed); | 1052 | dquot_alloc_block_nodirty(hint->inode, amount_needed); |
1053 | if (quota_ret) /* Quota exceeded? */ | 1053 | if (quota_ret) /* Quota exceeded? */ |
1054 | return QUOTA_EXCEEDED; | 1054 | return QUOTA_EXCEEDED; |
1055 | if (hint->preallocate && hint->prealloc_size) { | 1055 | if (hint->preallocate && hint->prealloc_size) { |
@@ -1058,7 +1058,7 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start | |||
1058 | "reiserquota: allocating (prealloc) %d blocks id=%u", | 1058 | "reiserquota: allocating (prealloc) %d blocks id=%u", |
1059 | hint->prealloc_size, hint->inode->i_uid); | 1059 | hint->prealloc_size, hint->inode->i_uid); |
1060 | #endif | 1060 | #endif |
1061 | quota_ret = vfs_dq_prealloc_block_nodirty(hint->inode, | 1061 | quota_ret = dquot_prealloc_block_nodirty(hint->inode, |
1062 | hint->prealloc_size); | 1062 | hint->prealloc_size); |
1063 | if (quota_ret) | 1063 | if (quota_ret) |
1064 | hint->preallocate = hint->prealloc_size = 0; | 1064 | hint->preallocate = hint->prealloc_size = 0; |
@@ -1092,7 +1092,7 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start | |||
1092 | hint->inode->i_uid); | 1092 | hint->inode->i_uid); |
1093 | #endif | 1093 | #endif |
1094 | /* Free not allocated blocks */ | 1094 | /* Free not allocated blocks */ |
1095 | vfs_dq_free_block_nodirty(hint->inode, | 1095 | dquot_free_block_nodirty(hint->inode, |
1096 | amount_needed + hint->prealloc_size - | 1096 | amount_needed + hint->prealloc_size - |
1097 | nr_allocated); | 1097 | nr_allocated); |
1098 | } | 1098 | } |
@@ -1125,7 +1125,7 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start | |||
1125 | REISERFS_I(hint->inode)->i_prealloc_count, | 1125 | REISERFS_I(hint->inode)->i_prealloc_count, |
1126 | hint->inode->i_uid); | 1126 | hint->inode->i_uid); |
1127 | #endif | 1127 | #endif |
1128 | vfs_dq_free_block_nodirty(hint->inode, amount_needed + | 1128 | dquot_free_block_nodirty(hint->inode, amount_needed + |
1129 | hint->prealloc_size - nr_allocated - | 1129 | hint->prealloc_size - nr_allocated - |
1130 | REISERFS_I(hint->inode)-> | 1130 | REISERFS_I(hint->inode)-> |
1131 | i_prealloc_count); | 1131 | i_prealloc_count); |
@@ -1277,7 +1277,10 @@ int reiserfs_init_bitmap_cache(struct super_block *sb) | |||
1277 | struct reiserfs_bitmap_info *bitmap; | 1277 | struct reiserfs_bitmap_info *bitmap; |
1278 | unsigned int bmap_nr = reiserfs_bmap_count(sb); | 1278 | unsigned int bmap_nr = reiserfs_bmap_count(sb); |
1279 | 1279 | ||
1280 | /* Avoid lock recursion in fault case */ | ||
1281 | reiserfs_write_unlock(sb); | ||
1280 | bitmap = vmalloc(sizeof(*bitmap) * bmap_nr); | 1282 | bitmap = vmalloc(sizeof(*bitmap) * bmap_nr); |
1283 | reiserfs_write_lock(sb); | ||
1281 | if (bitmap == NULL) | 1284 | if (bitmap == NULL) |
1282 | return -ENOMEM; | 1285 | return -ENOMEM; |
1283 | 1286 | ||