diff options
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, | |||
122 | { | 122 | { |
123 | struct address_space *btnc = | 123 | struct address_space *btnc = |
124 | &NILFS_BMAP_I((struct nilfs_bmap *)btree)->i_btnode_cache; | 124 | &NILFS_BMAP_I((struct nilfs_bmap *)btree)->i_btnode_cache; |
125 | int ret; | 125 | struct buffer_head *bh; |
126 | 126 | ||
127 | ret = nilfs_btnode_get(btnc, ptr, 0, bhp, 1); | 127 | bh = nilfs_btnode_create_block(btnc, ptr); |
128 | if (!ret) | 128 | if (!bh) |
129 | set_buffer_nilfs_volatile(*bhp); | 129 | return -ENOMEM; |
130 | return ret; | 130 | |
131 | set_buffer_nilfs_volatile(bh); | ||
132 | *bhp = bh; | ||
133 | return 0; | ||
131 | } | 134 | } |
132 | 135 | ||
133 | static inline int | 136 | static inline int |