aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2009-02-13 05:42:30 -0500
committerJoel Becker <joel.becker@oracle.com>2009-09-04 19:08:03 -0400
commit043beebb6c467a07ccd7aa666095f87fade1c28e (patch)
tree6e62d3e03ff20a633bd213420bc67ec2cb25b0bb /fs/ocfs2
parentd401dc12fcced123909eba10334fb5d78866d1a9 (diff)
ocfs2: ocfs2_truncate_rec() doesn't need struct inode.
It's not using it anymore. Remove it from the parameter list. Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/alloc.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index e1479faeb01c..4022fa4dffb5 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -5223,16 +5223,16 @@ out:
5223 return ret; 5223 return ret;
5224} 5224}
5225 5225
5226static int ocfs2_truncate_rec(struct inode *inode, handle_t *handle, 5226static int ocfs2_truncate_rec(handle_t *handle,
5227 struct ocfs2_extent_tree *et,
5227 struct ocfs2_path *path, int index, 5228 struct ocfs2_path *path, int index,
5228 struct ocfs2_cached_dealloc_ctxt *dealloc, 5229 struct ocfs2_cached_dealloc_ctxt *dealloc,
5229 u32 cpos, u32 len, 5230 u32 cpos, u32 len)
5230 struct ocfs2_extent_tree *et)
5231{ 5231{
5232 int ret; 5232 int ret;
5233 u32 left_cpos, rec_range, trunc_range; 5233 u32 left_cpos, rec_range, trunc_range;
5234 int wants_rotate = 0, is_rightmost_tree_rec = 0; 5234 int wants_rotate = 0, is_rightmost_tree_rec = 0;
5235 struct super_block *sb = inode->i_sb; 5235 struct super_block *sb = ocfs2_metadata_cache_get_super(et->et_ci);
5236 struct ocfs2_path *left_path = NULL; 5236 struct ocfs2_path *left_path = NULL;
5237 struct ocfs2_extent_list *el = path_leaf_el(path); 5237 struct ocfs2_extent_list *el = path_leaf_el(path);
5238 struct ocfs2_extent_rec *rec; 5238 struct ocfs2_extent_rec *rec;
@@ -5271,14 +5271,13 @@ static int ocfs2_truncate_rec(struct inode *inode, handle_t *handle,
5271 * by this leaf and the one to it's left. 5271 * by this leaf and the one to it's left.
5272 * 5272 *
5273 * There are two cases we can skip: 5273 * There are two cases we can skip:
5274 * 1) Path is the leftmost one in our inode tree. 5274 * 1) Path is the leftmost one in our btree.
5275 * 2) The leaf is rightmost and will be empty after 5275 * 2) The leaf is rightmost and will be empty after
5276 * we remove the extent record - the rotate code 5276 * we remove the extent record - the rotate code
5277 * knows how to update the newly formed edge. 5277 * knows how to update the newly formed edge.
5278 */ 5278 */
5279 5279
5280 ret = ocfs2_find_cpos_for_left_leaf(inode->i_sb, path, 5280 ret = ocfs2_find_cpos_for_left_leaf(sb, path, &left_cpos);
5281 &left_cpos);
5282 if (ret) { 5281 if (ret) {
5283 mlog_errno(ret); 5282 mlog_errno(ret);
5284 goto out; 5283 goto out;
@@ -5353,8 +5352,9 @@ static int ocfs2_truncate_rec(struct inode *inode, handle_t *handle,
5353 ocfs2_adjust_rightmost_records(handle, et, path, rec); 5352 ocfs2_adjust_rightmost_records(handle, et, path, rec);
5354 } else { 5353 } else {
5355 /* Caller should have trapped this. */ 5354 /* Caller should have trapped this. */
5356 mlog(ML_ERROR, "Inode %llu: Invalid record truncate: (%u, %u) " 5355 mlog(ML_ERROR, "Owner %llu: Invalid record truncate: (%u, %u) "
5357 "(%u, %u)\n", (unsigned long long)OCFS2_I(inode)->ip_blkno, 5356 "(%u, %u)\n",
5357 (unsigned long long)ocfs2_metadata_cache_owner(et->et_ci),
5358 le32_to_cpu(rec->e_cpos), 5358 le32_to_cpu(rec->e_cpos),
5359 le16_to_cpu(rec->e_leaf_clusters), cpos, len); 5359 le16_to_cpu(rec->e_leaf_clusters), cpos, len);
5360 BUG(); 5360 BUG();
@@ -5447,8 +5447,8 @@ int ocfs2_remove_extent(struct inode *inode,
5447 le32_to_cpu(rec->e_cpos), ocfs2_rec_clusters(el, rec)); 5447 le32_to_cpu(rec->e_cpos), ocfs2_rec_clusters(el, rec));
5448 5448
5449 if (le32_to_cpu(rec->e_cpos) == cpos || rec_range == trunc_range) { 5449 if (le32_to_cpu(rec->e_cpos) == cpos || rec_range == trunc_range) {
5450 ret = ocfs2_truncate_rec(inode, handle, path, index, dealloc, 5450 ret = ocfs2_truncate_rec(handle, et, path, index, dealloc,
5451 cpos, len, et); 5451 cpos, len);
5452 if (ret) { 5452 if (ret) {
5453 mlog_errno(ret); 5453 mlog_errno(ret);
5454 goto out; 5454 goto out;
@@ -5502,8 +5502,8 @@ int ocfs2_remove_extent(struct inode *inode,
5502 goto out; 5502 goto out;
5503 } 5503 }
5504 5504
5505 ret = ocfs2_truncate_rec(inode, handle, path, index, dealloc, 5505 ret = ocfs2_truncate_rec(handle, et, path, index, dealloc,
5506 cpos, len, et); 5506 cpos, len);
5507 if (ret) { 5507 if (ret) {
5508 mlog_errno(ret); 5508 mlog_errno(ret);
5509 goto out; 5509 goto out;