Skip to content

Commit 749d543

Browse files
author
Jaegeuk Kim
committed
f2fs: remove unnecessary __init_extent_tree
Added into the caller. Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 3bac20a commit 749d543

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

fs/f2fs/extent_cache.c

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -386,21 +386,6 @@ static struct extent_tree *__grab_extent_tree(struct inode *inode)
386386
return et;
387387
}
388388

389-
static struct extent_node *__init_extent_tree(struct f2fs_sb_info *sbi,
390-
struct extent_tree *et, struct extent_info *ei)
391-
{
392-
struct rb_node **p = &et->root.rb_root.rb_node;
393-
struct extent_node *en;
394-
395-
en = __attach_extent_node(sbi, et, ei, NULL, p, true);
396-
if (!en)
397-
return NULL;
398-
399-
et->largest = en->ei;
400-
et->cached_en = en;
401-
return en;
402-
}
403-
404389
static unsigned int __free_extent_tree(struct f2fs_sb_info *sbi,
405390
struct extent_tree *et)
406391
{
@@ -460,8 +445,12 @@ static void __f2fs_init_extent_tree(struct inode *inode, struct page *ipage)
460445
if (atomic_read(&et->node_cnt))
461446
goto out;
462447

463-
en = __init_extent_tree(sbi, et, &ei);
448+
en = __attach_extent_node(sbi, et, &ei, NULL,
449+
&et->root.rb_root.rb_node, true);
464450
if (en) {
451+
et->largest = en->ei;
452+
et->cached_en = en;
453+
465454
spin_lock(&sbi->extent_lock);
466455
list_add_tail(&en->list, &sbi->extent_list);
467456
spin_unlock(&sbi->extent_lock);

0 commit comments

Comments
 (0)