diff options
Diffstat (limited to 'fs/ext4/balloc.c')
-rw-r--r-- | fs/ext4/balloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index d2f37a5516c7..95b7594c76f9 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c | |||
@@ -591,14 +591,15 @@ ext4_fsblk_t ext4_new_meta_blocks(handle_t *handle, struct inode *inode, | |||
591 | ret = ext4_mb_new_blocks(handle, &ar, errp); | 591 | ret = ext4_mb_new_blocks(handle, &ar, errp); |
592 | if (count) | 592 | if (count) |
593 | *count = ar.len; | 593 | *count = ar.len; |
594 | |||
595 | /* | 594 | /* |
596 | * Account for the allocated meta blocks | 595 | * Account for the allocated meta blocks. We will never |
596 | * fail EDQUOT for metdata, but we do account for it. | ||
597 | */ | 597 | */ |
598 | if (!(*errp) && EXT4_I(inode)->i_delalloc_reserved_flag) { | 598 | if (!(*errp) && EXT4_I(inode)->i_delalloc_reserved_flag) { |
599 | spin_lock(&EXT4_I(inode)->i_block_reservation_lock); | 599 | spin_lock(&EXT4_I(inode)->i_block_reservation_lock); |
600 | EXT4_I(inode)->i_allocated_meta_blocks += ar.len; | 600 | EXT4_I(inode)->i_allocated_meta_blocks += ar.len; |
601 | spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); | 601 | spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); |
602 | dquot_alloc_block_nofail(inode, ar.len); | ||
602 | } | 603 | } |
603 | return ret; | 604 | return ret; |
604 | } | 605 | } |