mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
btrfs: remove cache only arguments from defrag path
The entry point at the defrag ioctl always sets "cache only" to 0; the codepaths haven't run for a long time as far as I can tell. Chris says they're dead code, so remove them. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
This commit is contained in:
parent
e4a2bcaca9
commit
de78b51a28
7 changed files with 32 additions and 82 deletions
|
@ -959,10 +959,10 @@ static noinline int commit_fs_roots(struct btrfs_trans_handle *trans,
|
|||
}
|
||||
|
||||
/*
|
||||
* defrag a given btree. If cacheonly == 1, this won't read from the disk,
|
||||
* otherwise every leaf in the btree is read and defragged.
|
||||
* defrag a given btree.
|
||||
* Every leaf in the btree is read and defragged.
|
||||
*/
|
||||
int btrfs_defrag_root(struct btrfs_root *root, int cacheonly)
|
||||
int btrfs_defrag_root(struct btrfs_root *root)
|
||||
{
|
||||
struct btrfs_fs_info *info = root->fs_info;
|
||||
struct btrfs_trans_handle *trans;
|
||||
|
@ -976,7 +976,7 @@ int btrfs_defrag_root(struct btrfs_root *root, int cacheonly)
|
|||
if (IS_ERR(trans))
|
||||
return PTR_ERR(trans);
|
||||
|
||||
ret = btrfs_defrag_leaves(trans, root, cacheonly);
|
||||
ret = btrfs_defrag_leaves(trans, root);
|
||||
|
||||
btrfs_end_transaction(trans, root);
|
||||
btrfs_btree_balance_dirty(info->tree_root);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue