aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/direct.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/direct.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/direct.c')
-rw-r--r--fs/nilfs2/direct.c28
1 files changed, 14 insertions, 14 deletions
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
126static int nilfs_direct_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr) 126static 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
377static const struct nilfs_bmap_operations nilfs_direct_ops = { 377static const struct nilfs_bmap_operations nilfs_direct_ops = {