mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-01 19:41:19 +00:00
btrfs: Remove unused arguments in tree-log.c
Following arguments are not used in tree-log.c: insert_one_name(): path, type wait_log_commit(): trans wait_for_writer(): trans This patch remove them. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
parent
34eb2a5249
commit
60d53eb310
1 changed files with 11 additions and 14 deletions
|
@ -1540,9 +1540,8 @@ static noinline int link_to_fixup_dir(struct btrfs_trans_handle *trans,
|
||||||
*/
|
*/
|
||||||
static noinline int insert_one_name(struct btrfs_trans_handle *trans,
|
static noinline int insert_one_name(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_root *root,
|
struct btrfs_root *root,
|
||||||
struct btrfs_path *path,
|
|
||||||
u64 dirid, u64 index,
|
u64 dirid, u64 index,
|
||||||
char *name, int name_len, u8 type,
|
char *name, int name_len,
|
||||||
struct btrfs_key *location)
|
struct btrfs_key *location)
|
||||||
{
|
{
|
||||||
struct inode *inode;
|
struct inode *inode;
|
||||||
|
@ -1716,8 +1715,8 @@ insert:
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
btrfs_release_path(path);
|
btrfs_release_path(path);
|
||||||
ret = insert_one_name(trans, root, path, key->objectid, key->offset,
|
ret = insert_one_name(trans, root, key->objectid, key->offset,
|
||||||
name, name_len, log_type, &log_key);
|
name, name_len, &log_key);
|
||||||
if (ret && ret != -ENOENT && ret != -EEXIST)
|
if (ret && ret != -ENOENT && ret != -EEXIST)
|
||||||
goto out;
|
goto out;
|
||||||
if (!ret)
|
if (!ret)
|
||||||
|
@ -2582,8 +2581,7 @@ static int update_log_root(struct btrfs_trans_handle *trans,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wait_log_commit(struct btrfs_trans_handle *trans,
|
static void wait_log_commit(struct btrfs_root *root, int transid)
|
||||||
struct btrfs_root *root, int transid)
|
|
||||||
{
|
{
|
||||||
DEFINE_WAIT(wait);
|
DEFINE_WAIT(wait);
|
||||||
int index = transid % 2;
|
int index = transid % 2;
|
||||||
|
@ -2608,8 +2606,7 @@ static void wait_log_commit(struct btrfs_trans_handle *trans,
|
||||||
atomic_read(&root->log_commit[index]));
|
atomic_read(&root->log_commit[index]));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wait_for_writer(struct btrfs_trans_handle *trans,
|
static void wait_for_writer(struct btrfs_root *root)
|
||||||
struct btrfs_root *root)
|
|
||||||
{
|
{
|
||||||
DEFINE_WAIT(wait);
|
DEFINE_WAIT(wait);
|
||||||
|
|
||||||
|
@ -2689,7 +2686,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
|
||||||
|
|
||||||
index1 = log_transid % 2;
|
index1 = log_transid % 2;
|
||||||
if (atomic_read(&root->log_commit[index1])) {
|
if (atomic_read(&root->log_commit[index1])) {
|
||||||
wait_log_commit(trans, root, log_transid);
|
wait_log_commit(root, log_transid);
|
||||||
mutex_unlock(&root->log_mutex);
|
mutex_unlock(&root->log_mutex);
|
||||||
return ctx->log_ret;
|
return ctx->log_ret;
|
||||||
}
|
}
|
||||||
|
@ -2698,7 +2695,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
|
||||||
|
|
||||||
/* wait for previous tree log sync to complete */
|
/* wait for previous tree log sync to complete */
|
||||||
if (atomic_read(&root->log_commit[(index1 + 1) % 2]))
|
if (atomic_read(&root->log_commit[(index1 + 1) % 2]))
|
||||||
wait_log_commit(trans, root, log_transid - 1);
|
wait_log_commit(root, log_transid - 1);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int batch = atomic_read(&root->log_batch);
|
int batch = atomic_read(&root->log_batch);
|
||||||
|
@ -2709,7 +2706,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
|
||||||
schedule_timeout_uninterruptible(1);
|
schedule_timeout_uninterruptible(1);
|
||||||
mutex_lock(&root->log_mutex);
|
mutex_lock(&root->log_mutex);
|
||||||
}
|
}
|
||||||
wait_for_writer(trans, root);
|
wait_for_writer(root);
|
||||||
if (batch == atomic_read(&root->log_batch))
|
if (batch == atomic_read(&root->log_batch))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2806,7 +2803,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
|
||||||
ret = btrfs_wait_marked_extents(log, &log->dirty_log_pages,
|
ret = btrfs_wait_marked_extents(log, &log->dirty_log_pages,
|
||||||
mark);
|
mark);
|
||||||
btrfs_wait_logged_extents(trans, log, log_transid);
|
btrfs_wait_logged_extents(trans, log, log_transid);
|
||||||
wait_log_commit(trans, log_root_tree,
|
wait_log_commit(log_root_tree,
|
||||||
root_log_ctx.log_transid);
|
root_log_ctx.log_transid);
|
||||||
mutex_unlock(&log_root_tree->log_mutex);
|
mutex_unlock(&log_root_tree->log_mutex);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
|
@ -2817,11 +2814,11 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
|
||||||
atomic_set(&log_root_tree->log_commit[index2], 1);
|
atomic_set(&log_root_tree->log_commit[index2], 1);
|
||||||
|
|
||||||
if (atomic_read(&log_root_tree->log_commit[(index2 + 1) % 2])) {
|
if (atomic_read(&log_root_tree->log_commit[(index2 + 1) % 2])) {
|
||||||
wait_log_commit(trans, log_root_tree,
|
wait_log_commit(log_root_tree,
|
||||||
root_log_ctx.log_transid - 1);
|
root_log_ctx.log_transid - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
wait_for_writer(trans, log_root_tree);
|
wait_for_writer(log_root_tree);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* now that we've moved on to the tree of log tree roots,
|
* now that we've moved on to the tree of log tree roots,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue