diff options
-rw-r--r-- | fs/reiserfs/do_balan.c | 17 | ||||
-rw-r--r-- | fs/reiserfs/lbalance.c | 5 | ||||
-rw-r--r-- | include/linux/reiserfs_fs.h | 2 |
3 files changed, 11 insertions, 13 deletions
diff --git a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c index 2f87f5b14630..99f80538c4bf 100644 --- a/fs/reiserfs/do_balan.c +++ b/fs/reiserfs/do_balan.c | |||
@@ -449,8 +449,7 @@ static int balance_leaf(struct tree_balance *tb, struct item_head *ih, /* item h | |||
449 | /* when we have merge directory item, pos_in_item has been changed too */ | 449 | /* when we have merge directory item, pos_in_item has been changed too */ |
450 | 450 | ||
451 | /* paste new directory entry. 1 is entry number */ | 451 | /* paste new directory entry. 1 is entry number */ |
452 | leaf_paste_entries(bi. | 452 | leaf_paste_entries(&bi, |
453 | bi_bh, | ||
454 | n + | 453 | n + |
455 | item_pos | 454 | item_pos |
456 | - | 455 | - |
@@ -699,7 +698,7 @@ static int balance_leaf(struct tree_balance *tb, struct item_head *ih, /* item h | |||
699 | n + item_pos - | 698 | n + item_pos - |
700 | ret_val); | 699 | ret_val); |
701 | if (is_direntry_le_ih(pasted)) | 700 | if (is_direntry_le_ih(pasted)) |
702 | leaf_paste_entries(bi.bi_bh, | 701 | leaf_paste_entries(&bi, |
703 | n + | 702 | n + |
704 | item_pos - | 703 | item_pos - |
705 | ret_val, | 704 | ret_val, |
@@ -894,8 +893,7 @@ static int balance_leaf(struct tree_balance *tb, struct item_head *ih, /* item h | |||
894 | tb->insert_size[0], | 893 | tb->insert_size[0], |
895 | body, zeros_num); | 894 | body, zeros_num); |
896 | /* paste entry */ | 895 | /* paste entry */ |
897 | leaf_paste_entries(bi. | 896 | leaf_paste_entries(&bi, |
898 | bi_bh, | ||
899 | 0, | 897 | 0, |
900 | paste_entry_position, | 898 | paste_entry_position, |
901 | 1, | 899 | 1, |
@@ -1096,7 +1094,7 @@ static int balance_leaf(struct tree_balance *tb, struct item_head *ih, /* item h | |||
1096 | tb->rnum[0]); | 1094 | tb->rnum[0]); |
1097 | if (is_direntry_le_ih(pasted) | 1095 | if (is_direntry_le_ih(pasted) |
1098 | && pos_in_item >= 0) { | 1096 | && pos_in_item >= 0) { |
1099 | leaf_paste_entries(bi.bi_bh, | 1097 | leaf_paste_entries(&bi, |
1100 | item_pos - | 1098 | item_pos - |
1101 | n + | 1099 | n + |
1102 | tb->rnum[0], | 1100 | tb->rnum[0], |
@@ -1339,8 +1337,7 @@ static int balance_leaf(struct tree_balance *tb, struct item_head *ih, /* item h | |||
1339 | tb->insert_size[0], | 1337 | tb->insert_size[0], |
1340 | body, zeros_num); | 1338 | body, zeros_num); |
1341 | /* paste new directory entry */ | 1339 | /* paste new directory entry */ |
1342 | leaf_paste_entries(bi. | 1340 | leaf_paste_entries(&bi, |
1343 | bi_bh, | ||
1344 | 0, | 1341 | 0, |
1345 | pos_in_item | 1342 | pos_in_item |
1346 | - | 1343 | - |
@@ -1505,7 +1502,7 @@ static int balance_leaf(struct tree_balance *tb, struct item_head *ih, /* item h | |||
1505 | item_pos - n + | 1502 | item_pos - n + |
1506 | snum[i]); | 1503 | snum[i]); |
1507 | if (is_direntry_le_ih(pasted)) { | 1504 | if (is_direntry_le_ih(pasted)) { |
1508 | leaf_paste_entries(bi.bi_bh, | 1505 | leaf_paste_entries(&bi, |
1509 | item_pos - | 1506 | item_pos - |
1510 | n + snum[i], | 1507 | n + snum[i], |
1511 | pos_in_item, | 1508 | pos_in_item, |
@@ -1606,7 +1603,7 @@ static int balance_leaf(struct tree_balance *tb, struct item_head *ih, /* item h | |||
1606 | zeros_num); | 1603 | zeros_num); |
1607 | 1604 | ||
1608 | /* paste entry */ | 1605 | /* paste entry */ |
1609 | leaf_paste_entries(bi.bi_bh, | 1606 | leaf_paste_entries(&bi, |
1610 | item_pos, | 1607 | item_pos, |
1611 | pos_in_item, | 1608 | pos_in_item, |
1612 | 1, | 1609 | 1, |
diff --git a/fs/reiserfs/lbalance.c b/fs/reiserfs/lbalance.c index 6de060a6aa7f..41bdd8c75887 100644 --- a/fs/reiserfs/lbalance.c +++ b/fs/reiserfs/lbalance.c | |||
@@ -111,7 +111,7 @@ static void leaf_copy_dir_entries(struct buffer_info *dest_bi, | |||
111 | item_num_in_dest = | 111 | item_num_in_dest = |
112 | (last_first == FIRST_TO_LAST) ? (B_NR_ITEMS(dest) - 1) : 0; | 112 | (last_first == FIRST_TO_LAST) ? (B_NR_ITEMS(dest) - 1) : 0; |
113 | 113 | ||
114 | leaf_paste_entries(dest_bi->bi_bh, item_num_in_dest, | 114 | leaf_paste_entries(dest_bi, item_num_in_dest, |
115 | (last_first == | 115 | (last_first == |
116 | FIRST_TO_LAST) ? I_ENTRY_COUNT(B_N_PITEM_HEAD(dest, | 116 | FIRST_TO_LAST) ? I_ENTRY_COUNT(B_N_PITEM_HEAD(dest, |
117 | item_num_in_dest)) | 117 | item_num_in_dest)) |
@@ -1191,7 +1191,7 @@ static void leaf_delete_items_entirely(struct buffer_info *bi, | |||
1191 | } | 1191 | } |
1192 | 1192 | ||
1193 | /* paste new_entry_count entries (new_dehs, records) into position before to item_num-th item */ | 1193 | /* paste new_entry_count entries (new_dehs, records) into position before to item_num-th item */ |
1194 | void leaf_paste_entries(struct buffer_head *bh, | 1194 | void leaf_paste_entries(struct buffer_info *bi, |
1195 | int item_num, | 1195 | int item_num, |
1196 | int before, | 1196 | int before, |
1197 | int new_entry_count, | 1197 | int new_entry_count, |
@@ -1203,6 +1203,7 @@ void leaf_paste_entries(struct buffer_head *bh, | |||
1203 | struct reiserfs_de_head *deh; | 1203 | struct reiserfs_de_head *deh; |
1204 | char *insert_point; | 1204 | char *insert_point; |
1205 | int i, old_entry_num; | 1205 | int i, old_entry_num; |
1206 | struct buffer_head *bh = bi->bi_bh; | ||
1206 | 1207 | ||
1207 | if (new_entry_count == 0) | 1208 | if (new_entry_count == 0) |
1208 | return; | 1209 | return; |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index bd52b949f8c9..65bb5e3e3abe 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -2026,7 +2026,7 @@ void leaf_paste_in_buffer(struct buffer_info *bi, int pasted_item_num, | |||
2026 | int zeros_number); | 2026 | int zeros_number); |
2027 | void leaf_cut_from_buffer(struct buffer_info *bi, int cut_item_num, | 2027 | void leaf_cut_from_buffer(struct buffer_info *bi, int cut_item_num, |
2028 | int pos_in_item, int cut_size); | 2028 | int pos_in_item, int cut_size); |
2029 | void leaf_paste_entries(struct buffer_head *bh, int item_num, int before, | 2029 | void leaf_paste_entries(struct buffer_info *bi, int item_num, int before, |
2030 | int new_entry_count, struct reiserfs_de_head *new_dehs, | 2030 | int new_entry_count, struct reiserfs_de_head *new_dehs, |
2031 | const char *records, int paste_size); | 2031 | const char *records, int paste_size); |
2032 | /* ibalance.c */ | 2032 | /* ibalance.c */ |