aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/direct.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-05-03 08:43:01 -0400
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-06-10 10:41:09 -0400
commitd97a51a7e3c298d9899ea91165dfa0783fa5cc5c (patch)
tree31c3b082565cd3004c2036fe79657297a29a5824 /fs/nilfs2/direct.c
parent65822070646ed7f2cf520439006dd863529be16e (diff)
nilfs2: unify bmap operations starting use of indirect block address
This simplifies some low level functions of bmap. Three bmap pointer operations, nilfs_bmap_start_v(), nilfs_bmap_commit_v(), and nilfs_bmap_abort_v(), are unified into one nilfs_bmap_start_v() function. And the related indirect function calls are replaced with it. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/direct.c')
-rw-r--r--fs/nilfs2/direct.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/nilfs2/direct.c b/fs/nilfs2/direct.c
index c6379e482781..5cbba8284bea 100644
--- a/fs/nilfs2/direct.c
+++ b/fs/nilfs2/direct.c
@@ -327,12 +327,9 @@ static int nilfs_direct_assign_v(struct nilfs_direct *direct,
327 int ret; 327 int ret;
328 328
329 req.bpr_ptr = ptr; 329 req.bpr_ptr = ptr;
330 ret = direct->d_bmap.b_pops->bpop_prepare_start_ptr( 330 ret = nilfs_bmap_start_v(&direct->d_bmap, &req, blocknr);
331 &direct->d_bmap, &req); 331 if (unlikely(ret < 0))
332 if (ret < 0)
333 return ret; 332 return ret;
334 direct->d_bmap.b_pops->bpop_commit_start_ptr(&direct->d_bmap,
335 &req, blocknr);
336 333
337 binfo->bi_v.bi_vblocknr = nilfs_bmap_ptr_to_dptr(ptr); 334 binfo->bi_v.bi_vblocknr = nilfs_bmap_ptr_to_dptr(ptr);
338 binfo->bi_v.bi_blkoff = nilfs_bmap_key_to_dkey(key); 335 binfo->bi_v.bi_blkoff = nilfs_bmap_key_to_dkey(key);