aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/bmap.c
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2009-04-06 22:01:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 11:31:17 -0400
commit8acfbf0939e98cc77dab94c24899c9930ddd1e13 (patch)
tree0f261ee58584db9a89a874f85646ab827105143f /fs/nilfs2/bmap.c
parent7fa10d20012296300dfe645cb3e628a4e9a0d5ef (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>
Diffstat (limited to 'fs/nilfs2/bmap.c')
-rw-r--r--fs/nilfs2/bmap.c46
1 files changed, 23 insertions, 23 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
174int nilfs_bmap_last_key(struct nilfs_bmap *bmap, unsigned long *key) 174int 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
593void nilfs_bmap_abort_update(struct nilfs_bmap *bmap, 593void 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
601static int nilfs_bmap_translate_v(const struct nilfs_bmap *bmap, __u64 ptr, 601static int nilfs_bmap_translate_v(const struct nilfs_bmap *bmap, __u64 ptr,