Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 377626
b: refs/heads/master
c: 2c00ef3
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Khoroshilov authored and Theodore Ts'o committed Jul 1, 2013
1 parent 61ff0ac commit 3944d5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ca792edc13c409e8d4eb9001e048264c6a2eb64
refs/heads/master: 2c00ef3ee309142041c7395f42aa1d49fc9f44b9
17 changes: 10 additions & 7 deletions trunk/fs/ext4/mballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4406,17 +4406,20 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle,
repeat:
/* allocate space in core */
*errp = ext4_mb_regular_allocator(ac);
if (*errp) {
ext4_discard_allocated_blocks(ac);
goto errout;
}
if (*errp)
goto discard_and_exit;

/* as we've just preallocated more space than
* user requested orinally, we store allocated
* user requested originally, we store allocated
* space in a special descriptor */
if (ac->ac_status == AC_STATUS_FOUND &&
ac->ac_o_ex.fe_len < ac->ac_b_ex.fe_len)
ext4_mb_new_preallocation(ac);
ac->ac_o_ex.fe_len < ac->ac_b_ex.fe_len)
*errp = ext4_mb_new_preallocation(ac);
if (*errp) {
discard_and_exit:
ext4_discard_allocated_blocks(ac);
goto errout;
}
}
if (likely(ac->ac_status == AC_STATUS_FOUND)) {
*errp = ext4_mb_mark_diskspace_used(ac, handle, reserv_clstrs);
Expand Down

0 comments on commit 3944d5c

Please sign in to comment.