File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -1746,7 +1746,6 @@ bool zswap_load(struct folio *folio)
1746
1746
struct zswap_tree * tree = zswap_trees [type ];
1747
1747
struct zswap_entry * entry ;
1748
1748
u8 * dst ;
1749
- bool ret ;
1750
1749
1751
1750
VM_WARN_ON_ONCE (!folio_test_locked (folio ));
1752
1751
@@ -1759,23 +1758,20 @@ bool zswap_load(struct folio *folio)
1759
1758
}
1760
1759
spin_unlock (& tree -> lock );
1761
1760
1762
- if (!entry -> length ) {
1761
+ if (entry -> length )
1762
+ __zswap_load (entry , page );
1763
+ else {
1763
1764
dst = kmap_local_page (page );
1764
1765
zswap_fill_page (dst , entry -> value );
1765
1766
kunmap_local (dst );
1766
- ret = true;
1767
- goto stats ;
1768
1767
}
1769
1768
1770
- __zswap_load (entry , page );
1771
- ret = true;
1772
- stats :
1773
1769
count_vm_event (ZSWPIN );
1774
1770
if (entry -> objcg )
1775
1771
count_objcg_event (entry -> objcg , ZSWPIN );
1776
1772
1777
1773
spin_lock (& tree -> lock );
1778
- if (ret && zswap_exclusive_loads_enabled ) {
1774
+ if (zswap_exclusive_loads_enabled ) {
1779
1775
zswap_invalidate_entry (tree , entry );
1780
1776
folio_mark_dirty (folio );
1781
1777
} else if (entry -> length ) {
@@ -1785,7 +1781,7 @@ bool zswap_load(struct folio *folio)
1785
1781
zswap_entry_put (tree , entry );
1786
1782
spin_unlock (& tree -> lock );
1787
1783
1788
- return ret ;
1784
+ return true ;
1789
1785
}
1790
1786
1791
1787
void zswap_invalidate (int type , pgoff_t offset )
You can’t perform that action at this time.
0 commit comments