aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/btnode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/btnode.c')
-rw-r--r--fs/nilfs2/btnode.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/nilfs2/btnode.c b/fs/nilfs2/btnode.c
index fc3e4bdb62ae..7086a2a1f7fa 100644
--- a/fs/nilfs2/btnode.c
+++ b/fs/nilfs2/btnode.c
@@ -270,12 +270,13 @@ retry:
270 unlock_page(obh->b_page); 270 unlock_page(obh->b_page);
271 } 271 }
272 272
273 err = nilfs_btnode_get(btnc, newkey, 0, &nbh, 1); 273 nbh = nilfs_btnode_create_block(btnc, newkey);
274 if (likely(!err)) { 274 if (!nbh)
275 BUG_ON(nbh == obh); 275 return -ENOMEM;
276 ctxt->newbh = nbh; 276
277 } 277 BUG_ON(nbh == obh);
278 return err; 278 ctxt->newbh = nbh;
279 return 0;
279 280
280 failed_unlock: 281 failed_unlock:
281 unlock_page(obh->b_page); 282 unlock_page(obh->b_page);