Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Filipe David Borba Manana and committed by
Chris Mason
74514323 53645a91

+3 -15
+1 -2
fs/btrfs/extent-tree.c
··· 3197 3197 if (ret) 3198 3198 goto out_put; 3199 3199 3200 - ret = btrfs_truncate_free_space_cache(root, trans, path, 3201 - inode); 3200 + ret = btrfs_truncate_free_space_cache(root, trans, inode); 3202 3201 if (ret) 3203 3202 goto out_put; 3204 3203 }
-1
fs/btrfs/free-space-cache.c
··· 218 218 219 219 int btrfs_truncate_free_space_cache(struct btrfs_root *root, 220 220 struct btrfs_trans_handle *trans, 221 - struct btrfs_path *path, 222 221 struct inode *inode) 223 222 { 224 223 int ret = 0;
-1
fs/btrfs/free-space-cache.h
··· 58 58 struct btrfs_block_rsv *rsv); 59 59 int btrfs_truncate_free_space_cache(struct btrfs_root *root, 60 60 struct btrfs_trans_handle *trans, 61 - struct btrfs_path *path, 62 61 struct inode *inode); 63 62 int load_free_space_cache(struct btrfs_fs_info *fs_info, 64 63 struct btrfs_block_group_cache *block_group);
+1 -1
fs/btrfs/inode-map.c
··· 466 466 } 467 467 468 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 470 if (ret) { 471 471 if (ret != -ENOSPC) 472 472 btrfs_abort_transaction(trans, root, ret);
+1 -10
fs/btrfs/relocation.c
··· 3407 3407 struct inode *inode, u64 ino) 3408 3408 { 3409 3409 struct btrfs_key key; 3410 - struct btrfs_path *path; 3411 3410 struct btrfs_root *root = fs_info->tree_root; 3412 3411 struct btrfs_trans_handle *trans; 3413 3412 int ret = 0; ··· 3431 3432 if (ret) 3432 3433 goto out; 3433 3434 3434 - path = btrfs_alloc_path(); 3435 - if (!path) { 3436 - ret = -ENOMEM; 3437 - goto out; 3438 - } 3439 - 3440 3435 trans = btrfs_join_transaction(root); 3441 3436 if (IS_ERR(trans)) { 3442 - btrfs_free_path(path); 3443 3437 ret = PTR_ERR(trans); 3444 3438 goto out; 3445 3439 } 3446 3440 3447 - ret = btrfs_truncate_free_space_cache(root, trans, path, inode); 3441 + ret = btrfs_truncate_free_space_cache(root, trans, inode); 3448 3442 3449 - btrfs_free_path(path); 3450 3443 btrfs_end_transaction(trans, root); 3451 3444 btrfs_btree_balance_dirty(root); 3452 3445 out: