Skip to content

Commit

Permalink
ocfs2: ocfs2_truncate_rec() doesn't need struct inode.
Browse files Browse the repository at this point in the history
It's not using it anymore.  Remove it from the parameter list.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
  • Loading branch information
Joel Becker committed Sep 4, 2009
1 parent d401dc1 commit 043beeb
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions fs/ocfs2/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5223,16 +5223,16 @@ static int ocfs2_split_tree(struct inode *inode, struct ocfs2_extent_tree *et,
return ret;
}

static int ocfs2_truncate_rec(struct inode *inode, handle_t *handle,
static int ocfs2_truncate_rec(handle_t *handle,
struct ocfs2_extent_tree *et,
struct ocfs2_path *path, int index,
struct ocfs2_cached_dealloc_ctxt *dealloc,
u32 cpos, u32 len,
struct ocfs2_extent_tree *et)
u32 cpos, u32 len)
{
int ret;
u32 left_cpos, rec_range, trunc_range;
int wants_rotate = 0, is_rightmost_tree_rec = 0;
struct super_block *sb = inode->i_sb;
struct super_block *sb = ocfs2_metadata_cache_get_super(et->et_ci);
struct ocfs2_path *left_path = NULL;
struct ocfs2_extent_list *el = path_leaf_el(path);
struct ocfs2_extent_rec *rec;
Expand Down Expand Up @@ -5271,14 +5271,13 @@ static int ocfs2_truncate_rec(struct inode *inode, handle_t *handle,
* by this leaf and the one to it's left.
*
* There are two cases we can skip:
* 1) Path is the leftmost one in our inode tree.
* 1) Path is the leftmost one in our btree.
* 2) The leaf is rightmost and will be empty after
* we remove the extent record - the rotate code
* knows how to update the newly formed edge.
*/

ret = ocfs2_find_cpos_for_left_leaf(inode->i_sb, path,
&left_cpos);
ret = ocfs2_find_cpos_for_left_leaf(sb, path, &left_cpos);
if (ret) {
mlog_errno(ret);
goto out;
Expand Down Expand Up @@ -5353,8 +5352,9 @@ static int ocfs2_truncate_rec(struct inode *inode, handle_t *handle,
ocfs2_adjust_rightmost_records(handle, et, path, rec);
} else {
/* Caller should have trapped this. */
mlog(ML_ERROR, "Inode %llu: Invalid record truncate: (%u, %u) "
"(%u, %u)\n", (unsigned long long)OCFS2_I(inode)->ip_blkno,
mlog(ML_ERROR, "Owner %llu: Invalid record truncate: (%u, %u) "
"(%u, %u)\n",
(unsigned long long)ocfs2_metadata_cache_owner(et->et_ci),
le32_to_cpu(rec->e_cpos),
le16_to_cpu(rec->e_leaf_clusters), cpos, len);
BUG();
Expand Down Expand Up @@ -5447,8 +5447,8 @@ int ocfs2_remove_extent(struct inode *inode,
le32_to_cpu(rec->e_cpos), ocfs2_rec_clusters(el, rec));

if (le32_to_cpu(rec->e_cpos) == cpos || rec_range == trunc_range) {
ret = ocfs2_truncate_rec(inode, handle, path, index, dealloc,
cpos, len, et);
ret = ocfs2_truncate_rec(handle, et, path, index, dealloc,
cpos, len);
if (ret) {
mlog_errno(ret);
goto out;
Expand Down Expand Up @@ -5502,8 +5502,8 @@ int ocfs2_remove_extent(struct inode *inode,
goto out;
}

ret = ocfs2_truncate_rec(inode, handle, path, index, dealloc,
cpos, len, et);
ret = ocfs2_truncate_rec(handle, et, path, index, dealloc,
cpos, len);
if (ret) {
mlog_errno(ret);
goto out;
Expand Down

0 comments on commit 043beeb

Please sign in to comment.