From d97a51a7e3c298d9899ea91165dfa0783fa5cc5c Mon Sep 17 00:00:00 2001 From: Ryusuke Konishi Date: Sun, 3 May 2009 21:43:01 +0900 Subject: 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 --- fs/nilfs2/direct.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'fs/nilfs2/direct.c') diff --git a/fs/nilfs2/direct.c b/fs/nilfs2/direct.c index c6379e4..5cbba82 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, int ret; req.bpr_ptr = ptr; - ret = direct->d_bmap.b_pops->bpop_prepare_start_ptr( - &direct->d_bmap, &req); - if (ret < 0) + ret = nilfs_bmap_start_v(&direct->d_bmap, &req, blocknr); + if (unlikely(ret < 0)) return ret; - direct->d_bmap.b_pops->bpop_commit_start_ptr(&direct->d_bmap, - &req, blocknr); binfo->bi_v.bi_vblocknr = nilfs_bmap_ptr_to_dptr(ptr); binfo->bi_v.bi_blkoff = nilfs_bmap_key_to_dkey(key); -- cgit v1.1