Commit 87d8a74b authored by Jan Kara's avatar Jan Kara Committed by Theodore Ts'o

ext4: fix setting of referenced bit in ext4_es_lookup_extent()

We were setting referenced bit on the extent structure we return from
ext4_es_lookup_extent() which is just a private structure on stack. Thus
setting had no effect. Set the bit in the structure in the status tree
instead.
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 600be30a
...@@ -823,8 +823,8 @@ int ext4_es_lookup_extent(struct inode *inode, ext4_lblk_t lblk, ...@@ -823,8 +823,8 @@ int ext4_es_lookup_extent(struct inode *inode, ext4_lblk_t lblk,
es->es_lblk = es1->es_lblk; es->es_lblk = es1->es_lblk;
es->es_len = es1->es_len; es->es_len = es1->es_len;
es->es_pblk = es1->es_pblk; es->es_pblk = es1->es_pblk;
if (!ext4_es_is_referenced(es)) if (!ext4_es_is_referenced(es1))
ext4_es_set_referenced(es); ext4_es_set_referenced(es1);
stats->es_stats_cache_hits++; stats->es_stats_cache_hits++;
} else { } else {
stats->es_stats_cache_misses++; stats->es_stats_cache_misses++;
......
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