Skip to content

Commit 87d8a74

Browse files
jankaratytso
authored andcommitted
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: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 600be30 commit 87d8a74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/ext4/extents_status.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,8 +823,8 @@ int ext4_es_lookup_extent(struct inode *inode, ext4_lblk_t lblk,
823823
es->es_lblk = es1->es_lblk;
824824
es->es_len = es1->es_len;
825825
es->es_pblk = es1->es_pblk;
826-
if (!ext4_es_is_referenced(es))
827-
ext4_es_set_referenced(es);
826+
if (!ext4_es_is_referenced(es1))
827+
ext4_es_set_referenced(es1);
828828
stats->es_stats_cache_hits++;
829829
} else {
830830
stats->es_stats_cache_misses++;

0 commit comments

Comments
 (0)