diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-04-06 22:01:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-07 11:31:17 -0400 |
commit | 8acfbf0939e98cc77dab94c24899c9930ddd1e13 (patch) | |
tree | 0f261ee58584db9a89a874f85646ab827105143f | |
parent | 7fa10d20012296300dfe645cb3e628a4e9a0d5ef (diff) |
nilfs2: clean up indirect function calling conventions
This cleans up the strange indirect function calling convention used in
nilfs to follow the normal kernel coding style.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/nilfs2/bmap.c | 46 | ||||
-rw-r--r-- | fs/nilfs2/btree.c | 62 | ||||
-rw-r--r-- | fs/nilfs2/direct.c | 28 | ||||
-rw-r--r-- | fs/nilfs2/ioctl.c | 2 |
4 files changed, 69 insertions, 69 deletions
diff --git a/fs/nilfs2/bmap.c b/fs/nilfs2/bmap.c index 6fe72addc9c5..24638e059bf3 100644 --- a/fs/nilfs2/bmap.c +++ b/fs/nilfs2/bmap.c | |||
@@ -38,11 +38,11 @@ int nilfs_bmap_lookup_at_level(struct nilfs_bmap *bmap, __u64 key, int level, | |||
38 | int ret; | 38 | int ret; |
39 | 39 | ||
40 | down_read(&bmap->b_sem); | 40 | down_read(&bmap->b_sem); |
41 | ret = (*bmap->b_ops->bop_lookup)(bmap, key, level, ptrp); | 41 | ret = bmap->b_ops->bop_lookup(bmap, key, level, ptrp); |
42 | if (ret < 0) | 42 | if (ret < 0) |
43 | goto out; | 43 | goto out; |
44 | if (bmap->b_pops->bpop_translate != NULL) { | 44 | if (bmap->b_pops->bpop_translate != NULL) { |
45 | ret = (*bmap->b_pops->bpop_translate)(bmap, *ptrp, &ptr); | 45 | ret = bmap->b_pops->bpop_translate(bmap, *ptrp, &ptr); |
46 | if (ret < 0) | 46 | if (ret < 0) |
47 | goto out; | 47 | goto out; |
48 | *ptrp = ptr; | 48 | *ptrp = ptr; |
@@ -94,9 +94,9 @@ static int nilfs_bmap_do_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr) | |||
94 | int ret, n; | 94 | int ret, n; |
95 | 95 | ||
96 | if (bmap->b_ops->bop_check_insert != NULL) { | 96 | if (bmap->b_ops->bop_check_insert != NULL) { |
97 | ret = (*bmap->b_ops->bop_check_insert)(bmap, key); | 97 | ret = bmap->b_ops->bop_check_insert(bmap, key); |
98 | if (ret > 0) { | 98 | if (ret > 0) { |
99 | n = (*bmap->b_ops->bop_gather_data)( | 99 | n = bmap->b_ops->bop_gather_data( |
100 | bmap, keys, ptrs, NILFS_BMAP_SMALL_HIGH + 1); | 100 | bmap, keys, ptrs, NILFS_BMAP_SMALL_HIGH + 1); |
101 | if (n < 0) | 101 | if (n < 0) |
102 | return n; | 102 | return n; |
@@ -111,7 +111,7 @@ static int nilfs_bmap_do_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr) | |||
111 | return ret; | 111 | return ret; |
112 | } | 112 | } |
113 | 113 | ||
114 | return (*bmap->b_ops->bop_insert)(bmap, key, ptr); | 114 | return bmap->b_ops->bop_insert(bmap, key, ptr); |
115 | } | 115 | } |
116 | 116 | ||
117 | /** | 117 | /** |
@@ -151,9 +151,9 @@ static int nilfs_bmap_do_delete(struct nilfs_bmap *bmap, __u64 key) | |||
151 | int ret, n; | 151 | int ret, n; |
152 | 152 | ||
153 | if (bmap->b_ops->bop_check_delete != NULL) { | 153 | if (bmap->b_ops->bop_check_delete != NULL) { |
154 | ret = (*bmap->b_ops->bop_check_delete)(bmap, key); | 154 | ret = bmap->b_ops->bop_check_delete(bmap, key); |
155 | if (ret > 0) { | 155 | if (ret > 0) { |
156 | n = (*bmap->b_ops->bop_gather_data)( | 156 | n = bmap->b_ops->bop_gather_data( |
157 | bmap, keys, ptrs, NILFS_BMAP_LARGE_LOW + 1); | 157 | bmap, keys, ptrs, NILFS_BMAP_LARGE_LOW + 1); |
158 | if (n < 0) | 158 | if (n < 0) |
159 | return n; | 159 | return n; |
@@ -168,7 +168,7 @@ static int nilfs_bmap_do_delete(struct nilfs_bmap *bmap, __u64 key) | |||
168 | return ret; | 168 | return ret; |
169 | } | 169 | } |
170 | 170 | ||
171 | return (*bmap->b_ops->bop_delete)(bmap, key); | 171 | return bmap->b_ops->bop_delete(bmap, key); |
172 | } | 172 | } |
173 | 173 | ||
174 | int nilfs_bmap_last_key(struct nilfs_bmap *bmap, unsigned long *key) | 174 | int nilfs_bmap_last_key(struct nilfs_bmap *bmap, unsigned long *key) |
@@ -177,7 +177,7 @@ int nilfs_bmap_last_key(struct nilfs_bmap *bmap, unsigned long *key) | |||
177 | int ret; | 177 | int ret; |
178 | 178 | ||
179 | down_read(&bmap->b_sem); | 179 | down_read(&bmap->b_sem); |
180 | ret = (*bmap->b_ops->bop_last_key)(bmap, &lastkey); | 180 | ret = bmap->b_ops->bop_last_key(bmap, &lastkey); |
181 | if (!ret) | 181 | if (!ret) |
182 | *key = lastkey; | 182 | *key = lastkey; |
183 | up_read(&bmap->b_sem); | 183 | up_read(&bmap->b_sem); |
@@ -216,7 +216,7 @@ static int nilfs_bmap_do_truncate(struct nilfs_bmap *bmap, unsigned long key) | |||
216 | __u64 lastkey; | 216 | __u64 lastkey; |
217 | int ret; | 217 | int ret; |
218 | 218 | ||
219 | ret = (*bmap->b_ops->bop_last_key)(bmap, &lastkey); | 219 | ret = bmap->b_ops->bop_last_key(bmap, &lastkey); |
220 | if (ret < 0) { | 220 | if (ret < 0) { |
221 | if (ret == -ENOENT) | 221 | if (ret == -ENOENT) |
222 | ret = 0; | 222 | ret = 0; |
@@ -227,7 +227,7 @@ static int nilfs_bmap_do_truncate(struct nilfs_bmap *bmap, unsigned long key) | |||
227 | ret = nilfs_bmap_do_delete(bmap, lastkey); | 227 | ret = nilfs_bmap_do_delete(bmap, lastkey); |
228 | if (ret < 0) | 228 | if (ret < 0) |
229 | return ret; | 229 | return ret; |
230 | ret = (*bmap->b_ops->bop_last_key)(bmap, &lastkey); | 230 | ret = bmap->b_ops->bop_last_key(bmap, &lastkey); |
231 | if (ret < 0) { | 231 | if (ret < 0) { |
232 | if (ret == -ENOENT) | 232 | if (ret == -ENOENT) |
233 | ret = 0; | 233 | ret = 0; |
@@ -272,7 +272,7 @@ void nilfs_bmap_clear(struct nilfs_bmap *bmap) | |||
272 | { | 272 | { |
273 | down_write(&bmap->b_sem); | 273 | down_write(&bmap->b_sem); |
274 | if (bmap->b_ops->bop_clear != NULL) | 274 | if (bmap->b_ops->bop_clear != NULL) |
275 | (*bmap->b_ops->bop_clear)(bmap); | 275 | bmap->b_ops->bop_clear(bmap); |
276 | up_write(&bmap->b_sem); | 276 | up_write(&bmap->b_sem); |
277 | } | 277 | } |
278 | 278 | ||
@@ -296,7 +296,7 @@ int nilfs_bmap_propagate(struct nilfs_bmap *bmap, struct buffer_head *bh) | |||
296 | int ret; | 296 | int ret; |
297 | 297 | ||
298 | down_write(&bmap->b_sem); | 298 | down_write(&bmap->b_sem); |
299 | ret = (*bmap->b_ops->bop_propagate)(bmap, bh); | 299 | ret = bmap->b_ops->bop_propagate(bmap, bh); |
300 | up_write(&bmap->b_sem); | 300 | up_write(&bmap->b_sem); |
301 | return ret; | 301 | return ret; |
302 | } | 302 | } |
@@ -310,7 +310,7 @@ void nilfs_bmap_lookup_dirty_buffers(struct nilfs_bmap *bmap, | |||
310 | struct list_head *listp) | 310 | struct list_head *listp) |
311 | { | 311 | { |
312 | if (bmap->b_ops->bop_lookup_dirty_buffers != NULL) | 312 | if (bmap->b_ops->bop_lookup_dirty_buffers != NULL) |
313 | (*bmap->b_ops->bop_lookup_dirty_buffers)(bmap, listp); | 313 | bmap->b_ops->bop_lookup_dirty_buffers(bmap, listp); |
314 | } | 314 | } |
315 | 315 | ||
316 | /** | 316 | /** |
@@ -340,7 +340,7 @@ int nilfs_bmap_assign(struct nilfs_bmap *bmap, | |||
340 | int ret; | 340 | int ret; |
341 | 341 | ||
342 | down_write(&bmap->b_sem); | 342 | down_write(&bmap->b_sem); |
343 | ret = (*bmap->b_ops->bop_assign)(bmap, bh, blocknr, binfo); | 343 | ret = bmap->b_ops->bop_assign(bmap, bh, blocknr, binfo); |
344 | up_write(&bmap->b_sem); | 344 | up_write(&bmap->b_sem); |
345 | return ret; | 345 | return ret; |
346 | } | 346 | } |
@@ -369,7 +369,7 @@ int nilfs_bmap_mark(struct nilfs_bmap *bmap, __u64 key, int level) | |||
369 | return 0; | 369 | return 0; |
370 | 370 | ||
371 | down_write(&bmap->b_sem); | 371 | down_write(&bmap->b_sem); |
372 | ret = (*bmap->b_ops->bop_mark)(bmap, key, level); | 372 | ret = bmap->b_ops->bop_mark(bmap, key, level); |
373 | up_write(&bmap->b_sem); | 373 | up_write(&bmap->b_sem); |
374 | return ret; | 374 | return ret; |
375 | } | 375 | } |
@@ -572,12 +572,12 @@ int nilfs_bmap_prepare_update(struct nilfs_bmap *bmap, | |||
572 | { | 572 | { |
573 | int ret; | 573 | int ret; |
574 | 574 | ||
575 | ret = (*bmap->b_pops->bpop_prepare_end_ptr)(bmap, oldreq); | 575 | ret = bmap->b_pops->bpop_prepare_end_ptr(bmap, oldreq); |
576 | if (ret < 0) | 576 | if (ret < 0) |
577 | return ret; | 577 | return ret; |
578 | ret = (*bmap->b_pops->bpop_prepare_alloc_ptr)(bmap, newreq); | 578 | ret = bmap->b_pops->bpop_prepare_alloc_ptr(bmap, newreq); |
579 | if (ret < 0) | 579 | if (ret < 0) |
580 | (*bmap->b_pops->bpop_abort_end_ptr)(bmap, oldreq); | 580 | bmap->b_pops->bpop_abort_end_ptr(bmap, oldreq); |
581 | 581 | ||
582 | return ret; | 582 | return ret; |
583 | } | 583 | } |
@@ -586,16 +586,16 @@ void nilfs_bmap_commit_update(struct nilfs_bmap *bmap, | |||
586 | union nilfs_bmap_ptr_req *oldreq, | 586 | union nilfs_bmap_ptr_req *oldreq, |
587 | union nilfs_bmap_ptr_req *newreq) | 587 | union nilfs_bmap_ptr_req *newreq) |
588 | { | 588 | { |
589 | (*bmap->b_pops->bpop_commit_end_ptr)(bmap, oldreq); | 589 | bmap->b_pops->bpop_commit_end_ptr(bmap, oldreq); |
590 | (*bmap->b_pops->bpop_commit_alloc_ptr)(bmap, newreq); | 590 | bmap->b_pops->bpop_commit_alloc_ptr(bmap, newreq); |
591 | } | 591 | } |
592 | 592 | ||
593 | void nilfs_bmap_abort_update(struct nilfs_bmap *bmap, | 593 | void nilfs_bmap_abort_update(struct nilfs_bmap *bmap, |
594 | union nilfs_bmap_ptr_req *oldreq, | 594 | union nilfs_bmap_ptr_req *oldreq, |
595 | union nilfs_bmap_ptr_req *newreq) | 595 | union nilfs_bmap_ptr_req *newreq) |
596 | { | 596 | { |
597 | (*bmap->b_pops->bpop_abort_end_ptr)(bmap, oldreq); | 597 | bmap->b_pops->bpop_abort_end_ptr(bmap, oldreq); |
598 | (*bmap->b_pops->bpop_abort_alloc_ptr)(bmap, newreq); | 598 | bmap->b_pops->bpop_abort_alloc_ptr(bmap, newreq); |
599 | } | 599 | } |
600 | 600 | ||
601 | static int nilfs_bmap_translate_v(const struct nilfs_bmap *bmap, __u64 ptr, | 601 | static int nilfs_bmap_translate_v(const struct nilfs_bmap *bmap, __u64 ptr, |
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c index 893f0190a61f..53f0d4c31cb0 100644 --- a/fs/nilfs2/btree.c +++ b/fs/nilfs2/btree.c | |||
@@ -902,9 +902,9 @@ static int nilfs_btree_prepare_insert(struct nilfs_btree *btree, | |||
902 | /* allocate a new ptr for data block */ | 902 | /* allocate a new ptr for data block */ |
903 | if (btree->bt_ops->btop_find_target != NULL) | 903 | if (btree->bt_ops->btop_find_target != NULL) |
904 | path[level].bp_newreq.bpr_ptr = | 904 | path[level].bp_newreq.bpr_ptr = |
905 | (*btree->bt_ops->btop_find_target)(btree, path, key); | 905 | btree->bt_ops->btop_find_target(btree, path, key); |
906 | 906 | ||
907 | ret = (*btree->bt_bmap.b_pops->bpop_prepare_alloc_ptr)( | 907 | ret = btree->bt_bmap.b_pops->bpop_prepare_alloc_ptr( |
908 | &btree->bt_bmap, &path[level].bp_newreq); | 908 | &btree->bt_bmap, &path[level].bp_newreq); |
909 | if (ret < 0) | 909 | if (ret < 0) |
910 | goto err_out_data; | 910 | goto err_out_data; |
@@ -965,7 +965,7 @@ static int nilfs_btree_prepare_insert(struct nilfs_btree *btree, | |||
965 | /* split */ | 965 | /* split */ |
966 | path[level].bp_newreq.bpr_ptr = | 966 | path[level].bp_newreq.bpr_ptr = |
967 | path[level - 1].bp_newreq.bpr_ptr + 1; | 967 | path[level - 1].bp_newreq.bpr_ptr + 1; |
968 | ret = (*btree->bt_bmap.b_pops->bpop_prepare_alloc_ptr)( | 968 | ret = btree->bt_bmap.b_pops->bpop_prepare_alloc_ptr( |
969 | &btree->bt_bmap, &path[level].bp_newreq); | 969 | &btree->bt_bmap, &path[level].bp_newreq); |
970 | if (ret < 0) | 970 | if (ret < 0) |
971 | goto err_out_child_node; | 971 | goto err_out_child_node; |
@@ -997,7 +997,7 @@ static int nilfs_btree_prepare_insert(struct nilfs_btree *btree, | |||
997 | 997 | ||
998 | /* grow */ | 998 | /* grow */ |
999 | path[level].bp_newreq.bpr_ptr = path[level - 1].bp_newreq.bpr_ptr + 1; | 999 | path[level].bp_newreq.bpr_ptr = path[level - 1].bp_newreq.bpr_ptr + 1; |
1000 | ret = (*btree->bt_bmap.b_pops->bpop_prepare_alloc_ptr)( | 1000 | ret = btree->bt_bmap.b_pops->bpop_prepare_alloc_ptr( |
1001 | &btree->bt_bmap, &path[level].bp_newreq); | 1001 | &btree->bt_bmap, &path[level].bp_newreq); |
1002 | if (ret < 0) | 1002 | if (ret < 0) |
1003 | goto err_out_child_node; | 1003 | goto err_out_child_node; |
@@ -1026,17 +1026,17 @@ static int nilfs_btree_prepare_insert(struct nilfs_btree *btree, | |||
1026 | 1026 | ||
1027 | /* error */ | 1027 | /* error */ |
1028 | err_out_curr_node: | 1028 | err_out_curr_node: |
1029 | (*btree->bt_bmap.b_pops->bpop_abort_alloc_ptr)(&btree->bt_bmap, | 1029 | btree->bt_bmap.b_pops->bpop_abort_alloc_ptr(&btree->bt_bmap, |
1030 | &path[level].bp_newreq); | 1030 | &path[level].bp_newreq); |
1031 | err_out_child_node: | 1031 | err_out_child_node: |
1032 | for (level--; level > NILFS_BTREE_LEVEL_DATA; level--) { | 1032 | for (level--; level > NILFS_BTREE_LEVEL_DATA; level--) { |
1033 | nilfs_bmap_delete_block(&btree->bt_bmap, path[level].bp_sib_bh); | 1033 | nilfs_bmap_delete_block(&btree->bt_bmap, path[level].bp_sib_bh); |
1034 | (*btree->bt_bmap.b_pops->bpop_abort_alloc_ptr)( | 1034 | btree->bt_bmap.b_pops->bpop_abort_alloc_ptr( |
1035 | &btree->bt_bmap, &path[level].bp_newreq); | 1035 | &btree->bt_bmap, &path[level].bp_newreq); |
1036 | 1036 | ||
1037 | } | 1037 | } |
1038 | 1038 | ||
1039 | (*btree->bt_bmap.b_pops->bpop_abort_alloc_ptr)(&btree->bt_bmap, | 1039 | btree->bt_bmap.b_pops->bpop_abort_alloc_ptr(&btree->bt_bmap, |
1040 | &path[level].bp_newreq); | 1040 | &path[level].bp_newreq); |
1041 | err_out_data: | 1041 | err_out_data: |
1042 | *levelp = level; | 1042 | *levelp = level; |
@@ -1053,14 +1053,14 @@ static void nilfs_btree_commit_insert(struct nilfs_btree *btree, | |||
1053 | set_buffer_nilfs_volatile((struct buffer_head *)((unsigned long)ptr)); | 1053 | set_buffer_nilfs_volatile((struct buffer_head *)((unsigned long)ptr)); |
1054 | ptr = path[NILFS_BTREE_LEVEL_DATA].bp_newreq.bpr_ptr; | 1054 | ptr = path[NILFS_BTREE_LEVEL_DATA].bp_newreq.bpr_ptr; |
1055 | if (btree->bt_ops->btop_set_target != NULL) | 1055 | if (btree->bt_ops->btop_set_target != NULL) |
1056 | (*btree->bt_ops->btop_set_target)(btree, key, ptr); | 1056 | btree->bt_ops->btop_set_target(btree, key, ptr); |
1057 | 1057 | ||
1058 | for (level = NILFS_BTREE_LEVEL_NODE_MIN; level <= maxlevel; level++) { | 1058 | for (level = NILFS_BTREE_LEVEL_NODE_MIN; level <= maxlevel; level++) { |
1059 | if (btree->bt_bmap.b_pops->bpop_commit_alloc_ptr != NULL) { | 1059 | if (btree->bt_bmap.b_pops->bpop_commit_alloc_ptr != NULL) { |
1060 | (*btree->bt_bmap.b_pops->bpop_commit_alloc_ptr)( | 1060 | btree->bt_bmap.b_pops->bpop_commit_alloc_ptr( |
1061 | &btree->bt_bmap, &path[level - 1].bp_newreq); | 1061 | &btree->bt_bmap, &path[level - 1].bp_newreq); |
1062 | } | 1062 | } |
1063 | (*path[level].bp_op)(btree, path, level, &key, &ptr); | 1063 | path[level].bp_op(btree, path, level, &key, &ptr); |
1064 | } | 1064 | } |
1065 | 1065 | ||
1066 | if (!nilfs_bmap_dirty(&btree->bt_bmap)) | 1066 | if (!nilfs_bmap_dirty(&btree->bt_bmap)) |
@@ -1304,7 +1304,7 @@ static int nilfs_btree_prepare_delete(struct nilfs_btree *btree, | |||
1304 | nilfs_btree_node_get_ptr(btree, node, | 1304 | nilfs_btree_node_get_ptr(btree, node, |
1305 | path[level].bp_index); | 1305 | path[level].bp_index); |
1306 | if (btree->bt_bmap.b_pops->bpop_prepare_end_ptr != NULL) { | 1306 | if (btree->bt_bmap.b_pops->bpop_prepare_end_ptr != NULL) { |
1307 | ret = (*btree->bt_bmap.b_pops->bpop_prepare_end_ptr)( | 1307 | ret = btree->bt_bmap.b_pops->bpop_prepare_end_ptr( |
1308 | &btree->bt_bmap, &path[level].bp_oldreq); | 1308 | &btree->bt_bmap, &path[level].bp_oldreq); |
1309 | if (ret < 0) | 1309 | if (ret < 0) |
1310 | goto err_out_child_node; | 1310 | goto err_out_child_node; |
@@ -1385,7 +1385,7 @@ static int nilfs_btree_prepare_delete(struct nilfs_btree *btree, | |||
1385 | path[level].bp_oldreq.bpr_ptr = | 1385 | path[level].bp_oldreq.bpr_ptr = |
1386 | nilfs_btree_node_get_ptr(btree, node, path[level].bp_index); | 1386 | nilfs_btree_node_get_ptr(btree, node, path[level].bp_index); |
1387 | if (btree->bt_bmap.b_pops->bpop_prepare_end_ptr != NULL) { | 1387 | if (btree->bt_bmap.b_pops->bpop_prepare_end_ptr != NULL) { |
1388 | ret = (*btree->bt_bmap.b_pops->bpop_prepare_end_ptr)( | 1388 | ret = btree->bt_bmap.b_pops->bpop_prepare_end_ptr( |
1389 | &btree->bt_bmap, &path[level].bp_oldreq); | 1389 | &btree->bt_bmap, &path[level].bp_oldreq); |
1390 | if (ret < 0) | 1390 | if (ret < 0) |
1391 | goto err_out_child_node; | 1391 | goto err_out_child_node; |
@@ -1402,13 +1402,13 @@ static int nilfs_btree_prepare_delete(struct nilfs_btree *btree, | |||
1402 | /* error */ | 1402 | /* error */ |
1403 | err_out_curr_node: | 1403 | err_out_curr_node: |
1404 | if (btree->bt_bmap.b_pops->bpop_abort_end_ptr != NULL) | 1404 | if (btree->bt_bmap.b_pops->bpop_abort_end_ptr != NULL) |
1405 | (*btree->bt_bmap.b_pops->bpop_abort_end_ptr)( | 1405 | btree->bt_bmap.b_pops->bpop_abort_end_ptr( |
1406 | &btree->bt_bmap, &path[level].bp_oldreq); | 1406 | &btree->bt_bmap, &path[level].bp_oldreq); |
1407 | err_out_child_node: | 1407 | err_out_child_node: |
1408 | for (level--; level >= NILFS_BTREE_LEVEL_NODE_MIN; level--) { | 1408 | for (level--; level >= NILFS_BTREE_LEVEL_NODE_MIN; level--) { |
1409 | nilfs_bmap_put_block(&btree->bt_bmap, path[level].bp_sib_bh); | 1409 | nilfs_bmap_put_block(&btree->bt_bmap, path[level].bp_sib_bh); |
1410 | if (btree->bt_bmap.b_pops->bpop_abort_end_ptr != NULL) | 1410 | if (btree->bt_bmap.b_pops->bpop_abort_end_ptr != NULL) |
1411 | (*btree->bt_bmap.b_pops->bpop_abort_end_ptr)( | 1411 | btree->bt_bmap.b_pops->bpop_abort_end_ptr( |
1412 | &btree->bt_bmap, &path[level].bp_oldreq); | 1412 | &btree->bt_bmap, &path[level].bp_oldreq); |
1413 | } | 1413 | } |
1414 | *levelp = level; | 1414 | *levelp = level; |
@@ -1424,9 +1424,9 @@ static void nilfs_btree_commit_delete(struct nilfs_btree *btree, | |||
1424 | 1424 | ||
1425 | for (level = NILFS_BTREE_LEVEL_NODE_MIN; level <= maxlevel; level++) { | 1425 | for (level = NILFS_BTREE_LEVEL_NODE_MIN; level <= maxlevel; level++) { |
1426 | if (btree->bt_bmap.b_pops->bpop_commit_end_ptr != NULL) | 1426 | if (btree->bt_bmap.b_pops->bpop_commit_end_ptr != NULL) |
1427 | (*btree->bt_bmap.b_pops->bpop_commit_end_ptr)( | 1427 | btree->bt_bmap.b_pops->bpop_commit_end_ptr( |
1428 | &btree->bt_bmap, &path[level].bp_oldreq); | 1428 | &btree->bt_bmap, &path[level].bp_oldreq); |
1429 | (*path[level].bp_op)(btree, path, level, NULL, NULL); | 1429 | path[level].bp_op(btree, path, level, NULL, NULL); |
1430 | } | 1430 | } |
1431 | 1431 | ||
1432 | if (!nilfs_bmap_dirty(&btree->bt_bmap)) | 1432 | if (!nilfs_bmap_dirty(&btree->bt_bmap)) |
@@ -1589,8 +1589,8 @@ nilfs_btree_prepare_convert_and_insert(struct nilfs_bmap *bmap, __u64 key, | |||
1589 | /* cannot find near ptr */ | 1589 | /* cannot find near ptr */ |
1590 | if (btree->bt_ops->btop_find_target != NULL) | 1590 | if (btree->bt_ops->btop_find_target != NULL) |
1591 | dreq->bpr_ptr | 1591 | dreq->bpr_ptr |
1592 | = (*btree->bt_ops->btop_find_target)(btree, NULL, key); | 1592 | = btree->bt_ops->btop_find_target(btree, NULL, key); |
1593 | ret = (*bmap->b_pops->bpop_prepare_alloc_ptr)(bmap, dreq); | 1593 | ret = bmap->b_pops->bpop_prepare_alloc_ptr(bmap, dreq); |
1594 | if (ret < 0) | 1594 | if (ret < 0) |
1595 | return ret; | 1595 | return ret; |
1596 | 1596 | ||
@@ -1598,7 +1598,7 @@ nilfs_btree_prepare_convert_and_insert(struct nilfs_bmap *bmap, __u64 key, | |||
1598 | stats->bs_nblocks++; | 1598 | stats->bs_nblocks++; |
1599 | if (nreq != NULL) { | 1599 | if (nreq != NULL) { |
1600 | nreq->bpr_ptr = dreq->bpr_ptr + 1; | 1600 | nreq->bpr_ptr = dreq->bpr_ptr + 1; |
1601 | ret = (*bmap->b_pops->bpop_prepare_alloc_ptr)(bmap, nreq); | 1601 | ret = bmap->b_pops->bpop_prepare_alloc_ptr(bmap, nreq); |
1602 | if (ret < 0) | 1602 | if (ret < 0) |
1603 | goto err_out_dreq; | 1603 | goto err_out_dreq; |
1604 | 1604 | ||
@@ -1615,9 +1615,9 @@ nilfs_btree_prepare_convert_and_insert(struct nilfs_bmap *bmap, __u64 key, | |||
1615 | 1615 | ||
1616 | /* error */ | 1616 | /* error */ |
1617 | err_out_nreq: | 1617 | err_out_nreq: |
1618 | (*bmap->b_pops->bpop_abort_alloc_ptr)(bmap, nreq); | 1618 | bmap->b_pops->bpop_abort_alloc_ptr(bmap, nreq); |
1619 | err_out_dreq: | 1619 | err_out_dreq: |
1620 | (*bmap->b_pops->bpop_abort_alloc_ptr)(bmap, dreq); | 1620 | bmap->b_pops->bpop_abort_alloc_ptr(bmap, dreq); |
1621 | stats->bs_nblocks = 0; | 1621 | stats->bs_nblocks = 0; |
1622 | return ret; | 1622 | return ret; |
1623 | 1623 | ||
@@ -1638,7 +1638,7 @@ nilfs_btree_commit_convert_and_insert(struct nilfs_bmap *bmap, | |||
1638 | 1638 | ||
1639 | /* free resources */ | 1639 | /* free resources */ |
1640 | if (bmap->b_ops->bop_clear != NULL) | 1640 | if (bmap->b_ops->bop_clear != NULL) |
1641 | (*bmap->b_ops->bop_clear)(bmap); | 1641 | bmap->b_ops->bop_clear(bmap); |
1642 | 1642 | ||
1643 | /* ptr must be a pointer to a buffer head. */ | 1643 | /* ptr must be a pointer to a buffer head. */ |
1644 | set_buffer_nilfs_volatile((struct buffer_head *)((unsigned long)ptr)); | 1644 | set_buffer_nilfs_volatile((struct buffer_head *)((unsigned long)ptr)); |
@@ -1648,8 +1648,8 @@ nilfs_btree_commit_convert_and_insert(struct nilfs_bmap *bmap, | |||
1648 | nilfs_btree_init(bmap, low, high); | 1648 | nilfs_btree_init(bmap, low, high); |
1649 | if (nreq != NULL) { | 1649 | if (nreq != NULL) { |
1650 | if (bmap->b_pops->bpop_commit_alloc_ptr != NULL) { | 1650 | if (bmap->b_pops->bpop_commit_alloc_ptr != NULL) { |
1651 | (*bmap->b_pops->bpop_commit_alloc_ptr)(bmap, dreq); | 1651 | bmap->b_pops->bpop_commit_alloc_ptr(bmap, dreq); |
1652 | (*bmap->b_pops->bpop_commit_alloc_ptr)(bmap, nreq); | 1652 | bmap->b_pops->bpop_commit_alloc_ptr(bmap, nreq); |
1653 | } | 1653 | } |
1654 | 1654 | ||
1655 | /* create child node at level 1 */ | 1655 | /* create child node at level 1 */ |
@@ -1673,7 +1673,7 @@ nilfs_btree_commit_convert_and_insert(struct nilfs_bmap *bmap, | |||
1673 | 2, 1, &keys[0], &tmpptr); | 1673 | 2, 1, &keys[0], &tmpptr); |
1674 | } else { | 1674 | } else { |
1675 | if (bmap->b_pops->bpop_commit_alloc_ptr != NULL) | 1675 | if (bmap->b_pops->bpop_commit_alloc_ptr != NULL) |
1676 | (*bmap->b_pops->bpop_commit_alloc_ptr)(bmap, dreq); | 1676 | bmap->b_pops->bpop_commit_alloc_ptr(bmap, dreq); |
1677 | 1677 | ||
1678 | /* create root node at level 1 */ | 1678 | /* create root node at level 1 */ |
1679 | node = nilfs_btree_get_root(btree); | 1679 | node = nilfs_btree_get_root(btree); |
@@ -1686,7 +1686,7 @@ nilfs_btree_commit_convert_and_insert(struct nilfs_bmap *bmap, | |||
1686 | } | 1686 | } |
1687 | 1687 | ||
1688 | if (btree->bt_ops->btop_set_target != NULL) | 1688 | if (btree->bt_ops->btop_set_target != NULL) |
1689 | (*btree->bt_ops->btop_set_target)(btree, key, dreq->bpr_ptr); | 1689 | btree->bt_ops->btop_set_target(btree, key, dreq->bpr_ptr); |
1690 | } | 1690 | } |
1691 | 1691 | ||
1692 | /** | 1692 | /** |
@@ -1937,7 +1937,7 @@ static int nilfs_btree_propagate(const struct nilfs_bmap *bmap, | |||
1937 | goto out; | 1937 | goto out; |
1938 | } | 1938 | } |
1939 | 1939 | ||
1940 | ret = (*btree->bt_ops->btop_propagate)(btree, path, level, bh); | 1940 | ret = btree->bt_ops->btop_propagate(btree, path, level, bh); |
1941 | 1941 | ||
1942 | out: | 1942 | out: |
1943 | nilfs_btree_clear_path(btree, path); | 1943 | nilfs_btree_clear_path(btree, path); |
@@ -2073,11 +2073,11 @@ static int nilfs_btree_assign_v(struct nilfs_btree *btree, | |||
2073 | ptr = nilfs_btree_node_get_ptr(btree, parent, | 2073 | ptr = nilfs_btree_node_get_ptr(btree, parent, |
2074 | path[level + 1].bp_index); | 2074 | path[level + 1].bp_index); |
2075 | req.bpr_ptr = ptr; | 2075 | req.bpr_ptr = ptr; |
2076 | ret = (*btree->bt_bmap.b_pops->bpop_prepare_start_ptr)(&btree->bt_bmap, | 2076 | ret = btree->bt_bmap.b_pops->bpop_prepare_start_ptr(&btree->bt_bmap, |
2077 | &req); | 2077 | &req); |
2078 | if (ret < 0) | 2078 | if (ret < 0) |
2079 | return ret; | 2079 | return ret; |
2080 | (*btree->bt_bmap.b_pops->bpop_commit_start_ptr)(&btree->bt_bmap, | 2080 | btree->bt_bmap.b_pops->bpop_commit_start_ptr(&btree->bt_bmap, |
2081 | &req, blocknr); | 2081 | &req, blocknr); |
2082 | 2082 | ||
2083 | key = nilfs_btree_node_get_key(btree, parent, | 2083 | key = nilfs_btree_node_get_key(btree, parent, |
@@ -2121,7 +2121,7 @@ static int nilfs_btree_assign(struct nilfs_bmap *bmap, | |||
2121 | goto out; | 2121 | goto out; |
2122 | } | 2122 | } |
2123 | 2123 | ||
2124 | ret = (*btree->bt_ops->btop_assign)(btree, path, level, bh, | 2124 | ret = btree->bt_ops->btop_assign(btree, path, level, bh, |
2125 | blocknr, binfo); | 2125 | blocknr, binfo); |
2126 | 2126 | ||
2127 | out: | 2127 | out: |
diff --git a/fs/nilfs2/direct.c b/fs/nilfs2/direct.c index 303d7f1982f9..e3ec24850089 100644 --- a/fs/nilfs2/direct.c +++ b/fs/nilfs2/direct.c | |||
@@ -91,8 +91,8 @@ static int nilfs_direct_prepare_insert(struct nilfs_direct *direct, | |||
91 | int ret; | 91 | int ret; |
92 | 92 | ||
93 | if (direct->d_ops->dop_find_target != NULL) | 93 | if (direct->d_ops->dop_find_target != NULL) |
94 | req->bpr_ptr = (*direct->d_ops->dop_find_target)(direct, key); | 94 | req->bpr_ptr = direct->d_ops->dop_find_target(direct, key); |
95 | ret = (*direct->d_bmap.b_pops->bpop_prepare_alloc_ptr)(&direct->d_bmap, | 95 | ret = direct->d_bmap.b_pops->bpop_prepare_alloc_ptr(&direct->d_bmap, |
96 | req); | 96 | req); |
97 | if (ret < 0) | 97 | if (ret < 0) |
98 | return ret; | 98 | return ret; |
@@ -112,7 +112,7 @@ static void nilfs_direct_commit_insert(struct nilfs_direct *direct, | |||
112 | set_buffer_nilfs_volatile(bh); | 112 | set_buffer_nilfs_volatile(bh); |
113 | 113 | ||
114 | if (direct->d_bmap.b_pops->bpop_commit_alloc_ptr != NULL) | 114 | if (direct->d_bmap.b_pops->bpop_commit_alloc_ptr != NULL) |
115 | (*direct->d_bmap.b_pops->bpop_commit_alloc_ptr)( | 115 | direct->d_bmap.b_pops->bpop_commit_alloc_ptr( |
116 | &direct->d_bmap, req); | 116 | &direct->d_bmap, req); |
117 | nilfs_direct_set_ptr(direct, key, req->bpr_ptr); | 117 | nilfs_direct_set_ptr(direct, key, req->bpr_ptr); |
118 | 118 | ||
@@ -120,7 +120,7 @@ static void nilfs_direct_commit_insert(struct nilfs_direct *direct, | |||
120 | nilfs_bmap_set_dirty(&direct->d_bmap); | 120 | nilfs_bmap_set_dirty(&direct->d_bmap); |
121 | 121 | ||
122 | if (direct->d_ops->dop_set_target != NULL) | 122 | if (direct->d_ops->dop_set_target != NULL) |
123 | (*direct->d_ops->dop_set_target)(direct, key, req->bpr_ptr); | 123 | direct->d_ops->dop_set_target(direct, key, req->bpr_ptr); |
124 | } | 124 | } |
125 | 125 | ||
126 | static int nilfs_direct_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr) | 126 | static int nilfs_direct_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr) |
@@ -154,7 +154,7 @@ static int nilfs_direct_prepare_delete(struct nilfs_direct *direct, | |||
154 | 154 | ||
155 | if (direct->d_bmap.b_pops->bpop_prepare_end_ptr != NULL) { | 155 | if (direct->d_bmap.b_pops->bpop_prepare_end_ptr != NULL) { |
156 | req->bpr_ptr = nilfs_direct_get_ptr(direct, key); | 156 | req->bpr_ptr = nilfs_direct_get_ptr(direct, key); |
157 | ret = (*direct->d_bmap.b_pops->bpop_prepare_end_ptr)( | 157 | ret = direct->d_bmap.b_pops->bpop_prepare_end_ptr( |
158 | &direct->d_bmap, req); | 158 | &direct->d_bmap, req); |
159 | if (ret < 0) | 159 | if (ret < 0) |
160 | return ret; | 160 | return ret; |
@@ -169,7 +169,7 @@ static void nilfs_direct_commit_delete(struct nilfs_direct *direct, | |||
169 | __u64 key) | 169 | __u64 key) |
170 | { | 170 | { |
171 | if (direct->d_bmap.b_pops->bpop_commit_end_ptr != NULL) | 171 | if (direct->d_bmap.b_pops->bpop_commit_end_ptr != NULL) |
172 | (*direct->d_bmap.b_pops->bpop_commit_end_ptr)( | 172 | direct->d_bmap.b_pops->bpop_commit_end_ptr( |
173 | &direct->d_bmap, req); | 173 | &direct->d_bmap, req); |
174 | nilfs_direct_set_ptr(direct, key, NILFS_BMAP_INVALID_PTR); | 174 | nilfs_direct_set_ptr(direct, key, NILFS_BMAP_INVALID_PTR); |
175 | } | 175 | } |
@@ -255,13 +255,13 @@ int nilfs_direct_delete_and_convert(struct nilfs_bmap *bmap, | |||
255 | /* no need to allocate any resource for conversion */ | 255 | /* no need to allocate any resource for conversion */ |
256 | 256 | ||
257 | /* delete */ | 257 | /* delete */ |
258 | ret = (*bmap->b_ops->bop_delete)(bmap, key); | 258 | ret = bmap->b_ops->bop_delete(bmap, key); |
259 | if (ret < 0) | 259 | if (ret < 0) |
260 | return ret; | 260 | return ret; |
261 | 261 | ||
262 | /* free resources */ | 262 | /* free resources */ |
263 | if (bmap->b_ops->bop_clear != NULL) | 263 | if (bmap->b_ops->bop_clear != NULL) |
264 | (*bmap->b_ops->bop_clear)(bmap); | 264 | bmap->b_ops->bop_clear(bmap); |
265 | 265 | ||
266 | /* convert */ | 266 | /* convert */ |
267 | direct = (struct nilfs_direct *)bmap; | 267 | direct = (struct nilfs_direct *)bmap; |
@@ -314,7 +314,7 @@ static int nilfs_direct_propagate(const struct nilfs_bmap *bmap, | |||
314 | 314 | ||
315 | direct = (struct nilfs_direct *)bmap; | 315 | direct = (struct nilfs_direct *)bmap; |
316 | return (direct->d_ops->dop_propagate != NULL) ? | 316 | return (direct->d_ops->dop_propagate != NULL) ? |
317 | (*direct->d_ops->dop_propagate)(direct, bh) : | 317 | direct->d_ops->dop_propagate(direct, bh) : |
318 | 0; | 318 | 0; |
319 | } | 319 | } |
320 | 320 | ||
@@ -328,12 +328,12 @@ static int nilfs_direct_assign_v(struct nilfs_direct *direct, | |||
328 | int ret; | 328 | int ret; |
329 | 329 | ||
330 | req.bpr_ptr = ptr; | 330 | req.bpr_ptr = ptr; |
331 | ret = (*direct->d_bmap.b_pops->bpop_prepare_start_ptr)( | 331 | ret = direct->d_bmap.b_pops->bpop_prepare_start_ptr( |
332 | &direct->d_bmap, &req); | 332 | &direct->d_bmap, &req); |
333 | if (ret < 0) | 333 | if (ret < 0) |
334 | return ret; | 334 | return ret; |
335 | (*direct->d_bmap.b_pops->bpop_commit_start_ptr)(&direct->d_bmap, | 335 | direct->d_bmap.b_pops->bpop_commit_start_ptr(&direct->d_bmap, |
336 | &req, blocknr); | 336 | &req, blocknr); |
337 | 337 | ||
338 | binfo->bi_v.bi_vblocknr = nilfs_bmap_ptr_to_dptr(ptr); | 338 | binfo->bi_v.bi_vblocknr = nilfs_bmap_ptr_to_dptr(ptr); |
339 | binfo->bi_v.bi_blkoff = nilfs_bmap_key_to_dkey(key); | 339 | binfo->bi_v.bi_blkoff = nilfs_bmap_key_to_dkey(key); |
@@ -370,8 +370,8 @@ static int nilfs_direct_assign(struct nilfs_bmap *bmap, | |||
370 | ptr = nilfs_direct_get_ptr(direct, key); | 370 | ptr = nilfs_direct_get_ptr(direct, key); |
371 | BUG_ON(ptr == NILFS_BMAP_INVALID_PTR); | 371 | BUG_ON(ptr == NILFS_BMAP_INVALID_PTR); |
372 | 372 | ||
373 | return (*direct->d_ops->dop_assign)(direct, key, ptr, bh, | 373 | return direct->d_ops->dop_assign(direct, key, ptr, bh, |
374 | blocknr, binfo); | 374 | blocknr, binfo); |
375 | } | 375 | } |
376 | 376 | ||
377 | static const struct nilfs_bmap_operations nilfs_direct_ops = { | 377 | static const struct nilfs_bmap_operations nilfs_direct_ops = { |
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index d9e3990f9589..9e4d9e64c8ff 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/nilfs2/ioctl.c | |||
@@ -71,7 +71,7 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs, | |||
71 | break; | 71 | break; |
72 | } | 72 | } |
73 | ppos = pos; | 73 | ppos = pos; |
74 | nr = (*dofunc)(nilfs, &pos, argv->v_flags, buf, argv->v_size, | 74 | nr = dofunc(nilfs, &pos, argv->v_flags, buf, argv->v_size, |
75 | n); | 75 | n); |
76 | if (nr < 0) { | 76 | if (nr < 0) { |
77 | ret = nr; | 77 | ret = nr; |