diff options
Diffstat (limited to 'fs/reiserfs/bitmap.c')
-rw-r--r-- | fs/reiserfs/bitmap.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c index 9fc228703ef0..e716161ab325 100644 --- a/fs/reiserfs/bitmap.c +++ b/fs/reiserfs/bitmap.c | |||
@@ -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 | DQUOT_FREE_BLOCK_NODIRTY(inode, 1); | 428 | vfs_dq_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 | DQUOT_ALLOC_BLOCK_NODIRTY(hint->inode, amount_needed); | 1052 | vfs_dq_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,8 +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 = | 1061 | quota_ret = vfs_dq_prealloc_block_nodirty(hint->inode, |
1062 | DQUOT_PREALLOC_BLOCK_NODIRTY(hint->inode, | ||
1063 | hint->prealloc_size); | 1062 | hint->prealloc_size); |
1064 | if (quota_ret) | 1063 | if (quota_ret) |
1065 | hint->preallocate = hint->prealloc_size = 0; | 1064 | hint->preallocate = hint->prealloc_size = 0; |
@@ -1092,7 +1091,10 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start | |||
1092 | nr_allocated, | 1091 | nr_allocated, |
1093 | hint->inode->i_uid); | 1092 | hint->inode->i_uid); |
1094 | #endif | 1093 | #endif |
1095 | DQUOT_FREE_BLOCK_NODIRTY(hint->inode, amount_needed + hint->prealloc_size - nr_allocated); /* Free not allocated blocks */ | 1094 | /* Free not allocated blocks */ |
1095 | vfs_dq_free_block_nodirty(hint->inode, | ||
1096 | amount_needed + hint->prealloc_size - | ||
1097 | nr_allocated); | ||
1096 | } | 1098 | } |
1097 | while (nr_allocated--) | 1099 | while (nr_allocated--) |
1098 | reiserfs_free_block(hint->th, hint->inode, | 1100 | reiserfs_free_block(hint->th, hint->inode, |
@@ -1123,7 +1125,7 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start | |||
1123 | REISERFS_I(hint->inode)->i_prealloc_count, | 1125 | REISERFS_I(hint->inode)->i_prealloc_count, |
1124 | hint->inode->i_uid); | 1126 | hint->inode->i_uid); |
1125 | #endif | 1127 | #endif |
1126 | DQUOT_FREE_BLOCK_NODIRTY(hint->inode, amount_needed + | 1128 | vfs_dq_free_block_nodirty(hint->inode, amount_needed + |
1127 | hint->prealloc_size - nr_allocated - | 1129 | hint->prealloc_size - nr_allocated - |
1128 | REISERFS_I(hint->inode)-> | 1130 | REISERFS_I(hint->inode)-> |
1129 | i_prealloc_count); | 1131 | i_prealloc_count); |