aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/balloc.c8
-rw-r--r--fs/ext4/ext4.h4
-rw-r--r--fs/ext4/inode.c2
-rw-r--r--fs/ext4/mballoc.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index 3d07c35c7089..af0c5357e35a 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -445,11 +445,11 @@ static int ext4_has_free_blocks(struct ext4_sb_info *sbi,
445 return 0; 445 return 0;
446} 446}
447 447
448int ext4_claim_free_blocks(struct ext4_sb_info *sbi, 448int ext4_claim_free_clusters(struct ext4_sb_info *sbi,
449 s64 nblocks, unsigned int flags) 449 s64 nclusters, unsigned int flags)
450{ 450{
451 if (ext4_has_free_blocks(sbi, nblocks, flags)) { 451 if (ext4_has_free_blocks(sbi, nclusters, flags)) {
452 percpu_counter_add(&sbi->s_dirtyclusters_counter, nblocks); 452 percpu_counter_add(&sbi->s_dirtyclusters_counter, nclusters);
453 return 0; 453 return 0;
454 } else 454 } else
455 return -ENOSPC; 455 return -ENOSPC;
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 1473c06e4c94..f97638634e34 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1773,8 +1773,8 @@ extern ext4_fsblk_t ext4_new_meta_blocks(handle_t *handle, struct inode *inode,
1773 unsigned int flags, 1773 unsigned int flags,
1774 unsigned long *count, 1774 unsigned long *count,
1775 int *errp); 1775 int *errp);
1776extern int ext4_claim_free_blocks(struct ext4_sb_info *sbi, 1776extern int ext4_claim_free_clusters(struct ext4_sb_info *sbi,
1777 s64 nblocks, unsigned int flags); 1777 s64 nclusters, unsigned int flags);
1778extern ext4_fsblk_t ext4_count_free_clusters(struct super_block *); 1778extern ext4_fsblk_t ext4_count_free_clusters(struct super_block *);
1779extern void ext4_check_blocks_bitmap(struct super_block *); 1779extern void ext4_check_blocks_bitmap(struct super_block *);
1780extern struct ext4_group_desc * ext4_get_group_desc(struct super_block * sb, 1780extern struct ext4_group_desc * ext4_get_group_desc(struct super_block * sb,
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index f9198d7875cc..557c34ffa05b 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1071,7 +1071,7 @@ repeat:
1071 * We do still charge estimated metadata to the sb though; 1071 * We do still charge estimated metadata to the sb though;
1072 * we cannot afford to run out of free blocks. 1072 * we cannot afford to run out of free blocks.
1073 */ 1073 */
1074 if (ext4_claim_free_blocks(sbi, md_needed + 1, 0)) { 1074 if (ext4_claim_free_clusters(sbi, md_needed + 1, 0)) {
1075 dquot_release_reservation_block(inode, EXT4_C2B(sbi, 1)); 1075 dquot_release_reservation_block(inode, EXT4_C2B(sbi, 1));
1076 if (ext4_should_retry_alloc(inode->i_sb, &retries)) { 1076 if (ext4_should_retry_alloc(inode->i_sb, &retries)) {
1077 yield(); 1077 yield();
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 90a3ed7c565c..1c83161090f8 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4297,7 +4297,7 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle,
4297 * and verify allocation doesn't exceed the quota limits. 4297 * and verify allocation doesn't exceed the quota limits.
4298 */ 4298 */
4299 while (ar->len && 4299 while (ar->len &&
4300 ext4_claim_free_blocks(sbi, ar->len, ar->flags)) { 4300 ext4_claim_free_clusters(sbi, ar->len, ar->flags)) {
4301 4301
4302 /* let others to free the space */ 4302 /* let others to free the space */
4303 yield(); 4303 yield();