summaryrefslogtreecommitdiff
path: root/fs/f2fs/extent_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/extent_cache.c')
-rw-r--r--fs/f2fs/extent_cache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c
index 32fae8ad5b7e..cea581353bc2 100644
--- a/fs/f2fs/extent_cache.c
+++ b/fs/f2fs/extent_cache.c
@@ -85,13 +85,13 @@ static struct extent_node *__lookup_extent_tree(struct extent_tree *et,
unsigned int fofs)
{
struct rb_node *node = et->root.rb_node;
- struct extent_node *en;
+ struct extent_node *en = et->cached_en;
- if (et->cached_en) {
- struct extent_info *cei = &et->cached_en->ei;
+ if (en) {
+ struct extent_info *cei = &en->ei;
if (cei->fofs <= fofs && cei->fofs + cei->len > fofs)
- return et->cached_en;
+ return en;
}
while (node) {