mirror of https://github.com/torvalds/linux.git
dm-pcache: reuse meta_addr in pcache_meta_find_latest
pcache_meta_find_latest() already computes the metadata address as meta_addr. Reuse that instead of recomputing. Signed-off-by: Li Chen <chenl311@chinatelecom.cn> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
This commit is contained in:
parent
341d14bd69
commit
840b80af74
|
|
@ -99,7 +99,7 @@ static inline void __must_check *pcache_meta_find_latest(struct pcache_meta_head
|
|||
/* Update latest if a more recent sequence is found */
|
||||
if (!latest || pcache_meta_seq_after(meta->seq, seq_latest)) {
|
||||
seq_latest = meta->seq;
|
||||
latest = (void *)header + (i * meta_max_size);
|
||||
latest = meta_addr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue