Commit 6174d3cb authored by Filipe David Borba Manana's avatar Filipe David Borba Manana Committed by Chris Mason

Btrfs: remove unused max_key arg from btrfs_search_forward

It is not used for anything.
Signed-off-by: default avatarFilipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent 7d3d1744
...@@ -4870,7 +4870,6 @@ static int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path) ...@@ -4870,7 +4870,6 @@ static int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path)
* was nothing in the tree that matched the search criteria. * was nothing in the tree that matched the search criteria.
*/ */
int btrfs_search_forward(struct btrfs_root *root, struct btrfs_key *min_key, int btrfs_search_forward(struct btrfs_root *root, struct btrfs_key *min_key,
struct btrfs_key *max_key,
struct btrfs_path *path, struct btrfs_path *path,
u64 min_trans) u64 min_trans)
{ {
......
...@@ -3309,7 +3309,6 @@ int btrfs_find_next_key(struct btrfs_root *root, struct btrfs_path *path, ...@@ -3309,7 +3309,6 @@ int btrfs_find_next_key(struct btrfs_root *root, struct btrfs_path *path,
struct btrfs_key *key, int lowest_level, struct btrfs_key *key, int lowest_level,
u64 min_trans); u64 min_trans);
int btrfs_search_forward(struct btrfs_root *root, struct btrfs_key *min_key, int btrfs_search_forward(struct btrfs_root *root, struct btrfs_key *min_key,
struct btrfs_key *max_key,
struct btrfs_path *path, struct btrfs_path *path,
u64 min_trans); u64 min_trans);
enum btrfs_compare_tree_result { enum btrfs_compare_tree_result {
......
...@@ -842,7 +842,6 @@ static int find_new_extents(struct btrfs_root *root, ...@@ -842,7 +842,6 @@ static int find_new_extents(struct btrfs_root *root,
{ {
struct btrfs_path *path; struct btrfs_path *path;
struct btrfs_key min_key; struct btrfs_key min_key;
struct btrfs_key max_key;
struct extent_buffer *leaf; struct extent_buffer *leaf;
struct btrfs_file_extent_item *extent; struct btrfs_file_extent_item *extent;
int type; int type;
...@@ -857,15 +856,10 @@ static int find_new_extents(struct btrfs_root *root, ...@@ -857,15 +856,10 @@ static int find_new_extents(struct btrfs_root *root,
min_key.type = BTRFS_EXTENT_DATA_KEY; min_key.type = BTRFS_EXTENT_DATA_KEY;
min_key.offset = *off; min_key.offset = *off;
max_key.objectid = ino;
max_key.type = (u8)-1;
max_key.offset = (u64)-1;
path->keep_locks = 1; path->keep_locks = 1;
while(1) { while(1) {
ret = btrfs_search_forward(root, &min_key, &max_key, ret = btrfs_search_forward(root, &min_key, path, newer_than);
path, newer_than);
if (ret != 0) if (ret != 0)
goto none; goto none;
if (min_key.objectid != ino) if (min_key.objectid != ino)
...@@ -1893,7 +1887,6 @@ static noinline int search_ioctl(struct inode *inode, ...@@ -1893,7 +1887,6 @@ static noinline int search_ioctl(struct inode *inode,
{ {
struct btrfs_root *root; struct btrfs_root *root;
struct btrfs_key key; struct btrfs_key key;
struct btrfs_key max_key;
struct btrfs_path *path; struct btrfs_path *path;
struct btrfs_ioctl_search_key *sk = &args->key; struct btrfs_ioctl_search_key *sk = &args->key;
struct btrfs_fs_info *info = BTRFS_I(inode)->root->fs_info; struct btrfs_fs_info *info = BTRFS_I(inode)->root->fs_info;
...@@ -1925,15 +1918,10 @@ static noinline int search_ioctl(struct inode *inode, ...@@ -1925,15 +1918,10 @@ static noinline int search_ioctl(struct inode *inode,
key.type = sk->min_type; key.type = sk->min_type;
key.offset = sk->min_offset; key.offset = sk->min_offset;
max_key.objectid = sk->max_objectid;
max_key.type = sk->max_type;
max_key.offset = sk->max_offset;
path->keep_locks = 1; path->keep_locks = 1;
while(1) { while(1) {
ret = btrfs_search_forward(root, &key, &max_key, path, ret = btrfs_search_forward(root, &key, path, sk->min_transid);
sk->min_transid);
if (ret != 0) { if (ret != 0) {
if (ret > 0) if (ret > 0)
ret = 0; ret = 0;
......
...@@ -85,7 +85,7 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans, ...@@ -85,7 +85,7 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
path->keep_locks = 1; path->keep_locks = 1;
ret = btrfs_search_forward(root, &key, NULL, path, min_trans); ret = btrfs_search_forward(root, &key, path, min_trans);
if (ret < 0) if (ret < 0)
goto out; goto out;
if (ret > 0) { if (ret > 0) {
......
...@@ -2867,7 +2867,6 @@ static noinline int log_dir_items(struct btrfs_trans_handle *trans, ...@@ -2867,7 +2867,6 @@ static noinline int log_dir_items(struct btrfs_trans_handle *trans,
u64 min_offset, u64 *last_offset_ret) u64 min_offset, u64 *last_offset_ret)
{ {
struct btrfs_key min_key; struct btrfs_key min_key;
struct btrfs_key max_key;
struct btrfs_root *log = root->log_root; struct btrfs_root *log = root->log_root;
struct extent_buffer *src; struct extent_buffer *src;
int err = 0; int err = 0;
...@@ -2879,9 +2878,6 @@ static noinline int log_dir_items(struct btrfs_trans_handle *trans, ...@@ -2879,9 +2878,6 @@ static noinline int log_dir_items(struct btrfs_trans_handle *trans,
u64 ino = btrfs_ino(inode); u64 ino = btrfs_ino(inode);
log = root->log_root; log = root->log_root;
max_key.objectid = ino;
max_key.offset = (u64)-1;
max_key.type = key_type;
min_key.objectid = ino; min_key.objectid = ino;
min_key.type = key_type; min_key.type = key_type;
...@@ -2889,8 +2885,7 @@ static noinline int log_dir_items(struct btrfs_trans_handle *trans, ...@@ -2889,8 +2885,7 @@ static noinline int log_dir_items(struct btrfs_trans_handle *trans,
path->keep_locks = 1; path->keep_locks = 1;
ret = btrfs_search_forward(root, &min_key, &max_key, ret = btrfs_search_forward(root, &min_key, path, trans->transid);
path, trans->transid);
/* /*
* we didn't find anything from this transaction, see if there * we didn't find anything from this transaction, see if there
...@@ -3719,7 +3714,7 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans, ...@@ -3719,7 +3714,7 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans,
while (1) { while (1) {
ins_nr = 0; ins_nr = 0;
ret = btrfs_search_forward(root, &min_key, &max_key, ret = btrfs_search_forward(root, &min_key,
path, trans->transid); path, trans->transid);
if (ret != 0) if (ret != 0)
break; break;
......
...@@ -260,7 +260,6 @@ int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info, ...@@ -260,7 +260,6 @@ int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info,
{ {
struct btrfs_root *root = fs_info->uuid_root; struct btrfs_root *root = fs_info->uuid_root;
struct btrfs_key key; struct btrfs_key key;
struct btrfs_key max_key;
struct btrfs_path *path; struct btrfs_path *path;
int ret = 0; int ret = 0;
struct extent_buffer *leaf; struct extent_buffer *leaf;
...@@ -277,13 +276,10 @@ int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info, ...@@ -277,13 +276,10 @@ int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info,
key.objectid = 0; key.objectid = 0;
key.type = 0; key.type = 0;
key.offset = 0; key.offset = 0;
max_key.objectid = (u64)-1;
max_key.type = (u8)-1;
max_key.offset = (u64)-1;
again_search_slot: again_search_slot:
path->keep_locks = 1; path->keep_locks = 1;
ret = btrfs_search_forward(root, &key, &max_key, path, 0); ret = btrfs_search_forward(root, &key, path, 0);
if (ret) { if (ret) {
if (ret > 0) if (ret > 0)
ret = 0; ret = 0;
......
...@@ -3488,7 +3488,7 @@ static int btrfs_uuid_scan_kthread(void *data) ...@@ -3488,7 +3488,7 @@ static int btrfs_uuid_scan_kthread(void *data)
path->keep_locks = 1; path->keep_locks = 1;
while (1) { while (1) {
ret = btrfs_search_forward(root, &key, &max_key, path, 0); ret = btrfs_search_forward(root, &key, path, 0);
if (ret) { if (ret) {
if (ret > 0) if (ret > 0)
ret = 0; ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment