aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@gmail.com>2013-09-20 09:46:51 -0400
committerChris Mason <chris.mason@fusionio.com>2013-11-11 21:51:33 -0500
commit74514323947ef27347564bfd7a663fdb3429cb20 (patch)
treea1a17402c0378d2133c7b48ae41e110e2f5978ef /fs/btrfs
parent53645a91f4baed059ec5dfb22340cf3e6b8fdd2c (diff)
Btrfs: remove path arg from btrfs_truncate_free_space_cache
Not used for anything, and removing it avoids caller's need to allocate a path structure. Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/extent-tree.c3
-rw-r--r--fs/btrfs/free-space-cache.c1
-rw-r--r--fs/btrfs/free-space-cache.h1
-rw-r--r--fs/btrfs/inode-map.c2
-rw-r--r--fs/btrfs/relocation.c11
5 files changed, 3 insertions, 15 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index d58bef130a41..55b537fcb81a 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3197,8 +3197,7 @@ again:
3197 if (ret) 3197 if (ret)
3198 goto out_put; 3198 goto out_put;
3199 3199
3200 ret = btrfs_truncate_free_space_cache(root, trans, path, 3200 ret = btrfs_truncate_free_space_cache(root, trans, inode);
3201 inode);
3202 if (ret) 3201 if (ret)
3203 goto out_put; 3202 goto out_put;
3204 } 3203 }
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 9a1e371a6eba..4772f3a8e7e5 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -218,7 +218,6 @@ int btrfs_check_trunc_cache_free_space(struct btrfs_root *root,
218 218
219int btrfs_truncate_free_space_cache(struct btrfs_root *root, 219int btrfs_truncate_free_space_cache(struct btrfs_root *root,
220 struct btrfs_trans_handle *trans, 220 struct btrfs_trans_handle *trans,
221 struct btrfs_path *path,
222 struct inode *inode) 221 struct inode *inode)
223{ 222{
224 int ret = 0; 223 int ret = 0;
diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h
index ba8d5a1b64b5..0cf4977ef70d 100644
--- a/fs/btrfs/free-space-cache.h
+++ b/fs/btrfs/free-space-cache.h
@@ -58,7 +58,6 @@ int btrfs_check_trunc_cache_free_space(struct btrfs_root *root,
58 struct btrfs_block_rsv *rsv); 58 struct btrfs_block_rsv *rsv);
59int btrfs_truncate_free_space_cache(struct btrfs_root *root, 59int btrfs_truncate_free_space_cache(struct btrfs_root *root,
60 struct btrfs_trans_handle *trans, 60 struct btrfs_trans_handle *trans,
61 struct btrfs_path *path,
62 struct inode *inode); 61 struct inode *inode);
63int load_free_space_cache(struct btrfs_fs_info *fs_info, 62int load_free_space_cache(struct btrfs_fs_info *fs_info,
64 struct btrfs_block_group_cache *block_group); 63 struct btrfs_block_group_cache *block_group);
diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c
index b863e45d373b..014de497e888 100644
--- a/fs/btrfs/inode-map.c
+++ b/fs/btrfs/inode-map.c
@@ -466,7 +466,7 @@ again:
466 } 466 }
467 467
468 if (i_size_read(inode) > 0) { 468 if (i_size_read(inode) > 0) {
469 ret = btrfs_truncate_free_space_cache(root, trans, path, inode); 469 ret = btrfs_truncate_free_space_cache(root, trans, inode);
470 if (ret) { 470 if (ret) {
471 if (ret != -ENOSPC) 471 if (ret != -ENOSPC)
472 btrfs_abort_transaction(trans, root, ret); 472 btrfs_abort_transaction(trans, root, ret);
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 4a355726151e..dec4f5aead0f 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -3407,7 +3407,6 @@ static int delete_block_group_cache(struct btrfs_fs_info *fs_info,
3407 struct inode *inode, u64 ino) 3407 struct inode *inode, u64 ino)
3408{ 3408{
3409 struct btrfs_key key; 3409 struct btrfs_key key;
3410 struct btrfs_path *path;
3411 struct btrfs_root *root = fs_info->tree_root; 3410 struct btrfs_root *root = fs_info->tree_root;
3412 struct btrfs_trans_handle *trans; 3411 struct btrfs_trans_handle *trans;
3413 int ret = 0; 3412 int ret = 0;
@@ -3432,22 +3431,14 @@ truncate:
3432 if (ret) 3431 if (ret)
3433 goto out; 3432 goto out;
3434 3433
3435 path = btrfs_alloc_path();
3436 if (!path) {
3437 ret = -ENOMEM;
3438 goto out;
3439 }
3440
3441 trans = btrfs_join_transaction(root); 3434 trans = btrfs_join_transaction(root);
3442 if (IS_ERR(trans)) { 3435 if (IS_ERR(trans)) {
3443 btrfs_free_path(path);
3444 ret = PTR_ERR(trans); 3436 ret = PTR_ERR(trans);
3445 goto out; 3437 goto out;
3446 } 3438 }
3447 3439
3448 ret = btrfs_truncate_free_space_cache(root, trans, path, inode); 3440 ret = btrfs_truncate_free_space_cache(root, trans, inode);
3449 3441
3450 btrfs_free_path(path);
3451 btrfs_end_transaction(trans, root); 3442 btrfs_end_transaction(trans, root);
3452 btrfs_btree_balance_dirty(root); 3443 btrfs_btree_balance_dirty(root);
3453out: 3444out: