diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-13 16:25:19 +0900 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-20 10:05:49 +0900 |
commit | 45f4910bc0bb904bcf53aa04ee1b807abe1387a6 (patch) | |
tree | d40f556ef778f9d4c2b37b4978fae29835de150d /fs/nilfs2/btree.c | |
parent | d501d7368937740e8d06671a4bfe4e236ed25bd0 (diff) | |
download | linux-45f4910bc0bb904bcf53aa04ee1b807abe1387a6.tar.gz linux-45f4910bc0bb904bcf53aa04ee1b807abe1387a6.tar.bz2 linux-45f4910bc0bb904bcf53aa04ee1b807abe1387a6.zip |
nilfs2: use nilfs_btnode_create_block function
This displaces nilfs_btnode_get() use to create new btree node block
with nilfs_btnode_create_block.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/btree.c')
-rw-r--r-- | fs/nilfs2/btree.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c index c9aab29ea1f6..7b0cc4fe9f0d 100644 --- a/fs/nilfs2/btree.c +++ b/fs/nilfs2/btree.c @@ -122,12 +122,15 @@ static int nilfs_btree_get_new_block(const struct nilfs_btree *btree, { struct address_space *btnc = &NILFS_BMAP_I((struct nilfs_bmap *)btree)->i_btnode_cache; - int ret; + struct buffer_head *bh; - ret = nilfs_btnode_get(btnc, ptr, 0, bhp, 1); - if (!ret) - set_buffer_nilfs_volatile(*bhp); - return ret; + bh = nilfs_btnode_create_block(btnc, ptr); + if (!bh) + return -ENOMEM; + + set_buffer_nilfs_volatile(bh); + *bhp = bh; + return 0; } static inline int |