diff options
author | Zhaolei <zhaolei@cn.fujitsu.com> | 2015-08-17 06:44:46 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-08-19 17:25:15 -0400 |
commit | 60d53eb3107c8e8960e8d7c22aa4e69aac7a8fe6 (patch) | |
tree | b7ed0b727776bcf71ae24f7e3c5c621ed92a81e2 /fs/btrfs/tree-log.c | |
parent | 34eb2a524997e5cd7117569b1fda925516adf6ac (diff) |
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>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 2e65e8e73844..6d650468d21a 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -1540,9 +1540,8 @@ static noinline int link_to_fixup_dir(struct btrfs_trans_handle *trans, | |||
1540 | */ | 1540 | */ |
1541 | static noinline int insert_one_name(struct btrfs_trans_handle *trans, | 1541 | static noinline int insert_one_name(struct btrfs_trans_handle *trans, |
1542 | struct btrfs_root *root, | 1542 | struct btrfs_root *root, |
1543 | struct btrfs_path *path, | ||
1544 | u64 dirid, u64 index, | 1543 | u64 dirid, u64 index, |
1545 | char *name, int name_len, u8 type, | 1544 | char *name, int name_len, |
1546 | struct btrfs_key *location) | 1545 | struct btrfs_key *location) |
1547 | { | 1546 | { |
1548 | struct inode *inode; | 1547 | struct inode *inode; |
@@ -1716,8 +1715,8 @@ insert: | |||
1716 | goto out; | 1715 | goto out; |
1717 | } | 1716 | } |
1718 | btrfs_release_path(path); | 1717 | btrfs_release_path(path); |
1719 | ret = insert_one_name(trans, root, path, key->objectid, key->offset, | 1718 | ret = insert_one_name(trans, root, key->objectid, key->offset, |
1720 | name, name_len, log_type, &log_key); | 1719 | name, name_len, &log_key); |
1721 | if (ret && ret != -ENOENT && ret != -EEXIST) | 1720 | if (ret && ret != -ENOENT && ret != -EEXIST) |
1722 | goto out; | 1721 | goto out; |
1723 | if (!ret) | 1722 | if (!ret) |
@@ -2582,8 +2581,7 @@ static int update_log_root(struct btrfs_trans_handle *trans, | |||
2582 | return ret; | 2581 | return ret; |
2583 | } | 2582 | } |
2584 | 2583 | ||
2585 | static void wait_log_commit(struct btrfs_trans_handle *trans, | 2584 | static void wait_log_commit(struct btrfs_root *root, int transid) |
2586 | struct btrfs_root *root, int transid) | ||
2587 | { | 2585 | { |
2588 | DEFINE_WAIT(wait); | 2586 | DEFINE_WAIT(wait); |
2589 | int index = transid % 2; | 2587 | int index = transid % 2; |
@@ -2608,8 +2606,7 @@ static void wait_log_commit(struct btrfs_trans_handle *trans, | |||
2608 | atomic_read(&root->log_commit[index])); | 2606 | atomic_read(&root->log_commit[index])); |
2609 | } | 2607 | } |
2610 | 2608 | ||
2611 | static void wait_for_writer(struct btrfs_trans_handle *trans, | 2609 | static void wait_for_writer(struct btrfs_root *root) |
2612 | struct btrfs_root *root) | ||
2613 | { | 2610 | { |
2614 | DEFINE_WAIT(wait); | 2611 | DEFINE_WAIT(wait); |
2615 | 2612 | ||
@@ -2689,7 +2686,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, | |||
2689 | 2686 | ||
2690 | index1 = log_transid % 2; | 2687 | index1 = log_transid % 2; |
2691 | if (atomic_read(&root->log_commit[index1])) { | 2688 | if (atomic_read(&root->log_commit[index1])) { |
2692 | wait_log_commit(trans, root, log_transid); | 2689 | wait_log_commit(root, log_transid); |
2693 | mutex_unlock(&root->log_mutex); | 2690 | mutex_unlock(&root->log_mutex); |
2694 | return ctx->log_ret; | 2691 | return ctx->log_ret; |
2695 | } | 2692 | } |
@@ -2698,7 +2695,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, | |||
2698 | 2695 | ||
2699 | /* wait for previous tree log sync to complete */ | 2696 | /* wait for previous tree log sync to complete */ |
2700 | if (atomic_read(&root->log_commit[(index1 + 1) % 2])) | 2697 | if (atomic_read(&root->log_commit[(index1 + 1) % 2])) |
2701 | wait_log_commit(trans, root, log_transid - 1); | 2698 | wait_log_commit(root, log_transid - 1); |
2702 | 2699 | ||
2703 | while (1) { | 2700 | while (1) { |
2704 | int batch = atomic_read(&root->log_batch); | 2701 | int batch = atomic_read(&root->log_batch); |
@@ -2709,7 +2706,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, | |||
2709 | schedule_timeout_uninterruptible(1); | 2706 | schedule_timeout_uninterruptible(1); |
2710 | mutex_lock(&root->log_mutex); | 2707 | mutex_lock(&root->log_mutex); |
2711 | } | 2708 | } |
2712 | wait_for_writer(trans, root); | 2709 | wait_for_writer(root); |
2713 | if (batch == atomic_read(&root->log_batch)) | 2710 | if (batch == atomic_read(&root->log_batch)) |
2714 | break; | 2711 | break; |
2715 | } | 2712 | } |
@@ -2806,7 +2803,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, | |||
2806 | ret = btrfs_wait_marked_extents(log, &log->dirty_log_pages, | 2803 | ret = btrfs_wait_marked_extents(log, &log->dirty_log_pages, |
2807 | mark); | 2804 | mark); |
2808 | btrfs_wait_logged_extents(trans, log, log_transid); | 2805 | btrfs_wait_logged_extents(trans, log, log_transid); |
2809 | wait_log_commit(trans, log_root_tree, | 2806 | wait_log_commit(log_root_tree, |
2810 | root_log_ctx.log_transid); | 2807 | root_log_ctx.log_transid); |
2811 | mutex_unlock(&log_root_tree->log_mutex); | 2808 | mutex_unlock(&log_root_tree->log_mutex); |
2812 | if (!ret) | 2809 | if (!ret) |
@@ -2817,11 +2814,11 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, | |||
2817 | atomic_set(&log_root_tree->log_commit[index2], 1); | 2814 | atomic_set(&log_root_tree->log_commit[index2], 1); |
2818 | 2815 | ||
2819 | if (atomic_read(&log_root_tree->log_commit[(index2 + 1) % 2])) { | 2816 | if (atomic_read(&log_root_tree->log_commit[(index2 + 1) % 2])) { |
2820 | wait_log_commit(trans, log_root_tree, | 2817 | wait_log_commit(log_root_tree, |
2821 | root_log_ctx.log_transid - 1); | 2818 | root_log_ctx.log_transid - 1); |
2822 | } | 2819 | } |
2823 | 2820 | ||
2824 | wait_for_writer(trans, log_root_tree); | 2821 | wait_for_writer(log_root_tree); |
2825 | 2822 | ||
2826 | /* | 2823 | /* |
2827 | * now that we've moved on to the tree of log tree roots, | 2824 | * now that we've moved on to the tree of log tree roots, |