Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165070
b: refs/heads/master
c: 6641b0c
h: refs/heads/master
v: v3
  • Loading branch information
Joel Becker committed Sep 4, 2009
1 parent 20fea77 commit 1fe9a2e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 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: 42a5a7a9a5abf9a566b91c51137921957b9a14e4
refs/heads/master: 6641b0ce3274d979338cb67b2f562189dcbc1c28
20 changes: 11 additions & 9 deletions trunk/fs/ocfs2/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2536,7 +2536,8 @@ static int ocfs2_update_edge_lengths(struct inode *inode, handle_t *handle,
return ret;
}

static void ocfs2_unlink_path(struct inode *inode, handle_t *handle,
static void ocfs2_unlink_path(handle_t *handle,
struct ocfs2_extent_tree *et,
struct ocfs2_cached_dealloc_ctxt *dealloc,
struct ocfs2_path *path, int unlink_start)
{
Expand All @@ -2558,12 +2559,12 @@ static void ocfs2_unlink_path(struct inode *inode, handle_t *handle,
mlog(ML_ERROR,
"Inode %llu, attempted to remove extent block "
"%llu with %u records\n",
(unsigned long long)OCFS2_I(inode)->ip_blkno,
(unsigned long long)ocfs2_metadata_cache_owner(et->et_ci),
(unsigned long long)le64_to_cpu(eb->h_blkno),
le16_to_cpu(el->l_next_free_rec));

ocfs2_journal_dirty(handle, bh);
ocfs2_remove_from_cache(INODE_CACHE(inode), bh);
ocfs2_remove_from_cache(et->et_ci, bh);
continue;
}

Expand All @@ -2576,11 +2577,12 @@ static void ocfs2_unlink_path(struct inode *inode, handle_t *handle,
if (ret)
mlog_errno(ret);

ocfs2_remove_from_cache(INODE_CACHE(inode), bh);
ocfs2_remove_from_cache(et->et_ci, bh);
}
}

static void ocfs2_unlink_subtree(struct inode *inode, handle_t *handle,
static void ocfs2_unlink_subtree(handle_t *handle,
struct ocfs2_extent_tree *et,
struct ocfs2_path *left_path,
struct ocfs2_path *right_path,
int subtree_index,
Expand Down Expand Up @@ -2611,7 +2613,7 @@ static void ocfs2_unlink_subtree(struct inode *inode, handle_t *handle,
ocfs2_journal_dirty(handle, root_bh);
ocfs2_journal_dirty(handle, path_leaf_bh(left_path));

ocfs2_unlink_path(inode, handle, dealloc, right_path,
ocfs2_unlink_path(handle, et, dealloc, right_path,
subtree_index + 1);
}

Expand Down Expand Up @@ -2744,7 +2746,7 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle,
mlog_errno(ret);

if (del_right_subtree) {
ocfs2_unlink_subtree(inode, handle, left_path, right_path,
ocfs2_unlink_subtree(handle, et, left_path, right_path,
subtree_index, dealloc);
ret = ocfs2_update_edge_lengths(inode, handle, subtree_index,
left_path);
Expand Down Expand Up @@ -3067,7 +3069,7 @@ static int ocfs2_remove_rightmost_path(struct inode *inode, handle_t *handle,

subtree_index = ocfs2_find_subtree_root(inode, left_path, path);

ocfs2_unlink_subtree(inode, handle, left_path, path,
ocfs2_unlink_subtree(handle, et, left_path, path,
subtree_index, dealloc);
ret = ocfs2_update_edge_lengths(inode, handle, subtree_index,
left_path);
Expand All @@ -3086,7 +3088,7 @@ static int ocfs2_remove_rightmost_path(struct inode *inode, handle_t *handle,
* revert the inode back to having extents
* in-line.
*/
ocfs2_unlink_path(inode, handle, dealloc, path, 1);
ocfs2_unlink_path(handle, et, dealloc, path, 1);

el = et->et_root_el;
el->l_tree_depth = 0;
Expand Down

0 comments on commit 1fe9a2e

Please sign in to comment.