Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165134
b: refs/heads/master
c: c18b812
h: refs/heads/master
v: v3
  • Loading branch information
Tao Ma authored and Joel Becker committed Sep 23, 2009
1 parent 255c25f commit 34ee649
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: 7540c1a77b26bc2f9d86a0bfbe6597b05ec5f93d
refs/heads/master: c18b812d127a971901180188b918a7cd98ccd4d6
12 changes: 10 additions & 2 deletions trunk/fs/ocfs2/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2326,10 +2326,18 @@ static int ocfs2_extend_rotate_transaction(handle_t *handle, int subtree_depth,
int op_credits,
struct ocfs2_path *path)
{
int ret;
int credits = (path->p_tree_depth - subtree_depth) * 2 + 1 + op_credits;

if (handle->h_buffer_credits < credits)
return ocfs2_extend_trans(handle, credits);
if (handle->h_buffer_credits < credits) {
ret = ocfs2_extend_trans(handle,
credits - handle->h_buffer_credits);
if (ret)
return ret;

if (unlikely(handle->h_buffer_credits < credits))
return ocfs2_extend_trans(handle, credits);
}

return 0;
}
Expand Down

0 comments on commit 34ee649

Please sign in to comment.