Commit 19526d74 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: avoid opened loop codes in __add_ino_entry

We will keep __add_ino_entry success all the time, for ENOMEM failure
case, we have already handled it by using  __GFP_NOFAIL flag, so we
don't have to use additional opened loop codes here, remove them.
Signed-off-by: 's avatarChao Yu <>
Signed-off-by: 's avatarJaegeuk Kim <>
parent 4f0a03d3
......@@ -407,18 +407,16 @@ static void __add_ino_entry(struct f2fs_sb_info *sbi, nid_t ino,
struct ino_entry *e, *tmp;
tmp = f2fs_kmem_cache_alloc(ino_entry_slab, GFP_NOFS);
radix_tree_preload(GFP_NOFS | __GFP_NOFAIL);
e = radix_tree_lookup(&im->ino_root, ino);
if (!e) {
e = tmp;
if (radix_tree_insert(&im->ino_root, ino, e)) {
goto retry;
if (unlikely(radix_tree_insert(&im->ino_root, ino, e)))
f2fs_bug_on(sbi, 1);
memset(e, 0, sizeof(struct ino_entry));
e->ino = ino;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment