|
|
@@ -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);
|
|
|
-retry:
|
|
|
+
|
|
|
radix_tree_preload(GFP_NOFS | __GFP_NOFAIL);
|
|
|
|
|
|
spin_lock(&im->ino_lock);
|
|
|
e = radix_tree_lookup(&im->ino_root, ino);
|
|
|
if (!e) {
|
|
|
e = tmp;
|
|
|
- if (radix_tree_insert(&im->ino_root, ino, e)) {
|
|
|
- spin_unlock(&im->ino_lock);
|
|
|
- radix_tree_preload_end();
|
|
|
- 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;
|
|
|
|