summaryrefslogtreecommitdiffstats
path: root/drivers/block/zram/zram_drv.c
diff options
context:
space:
mode:
authorDomenico Cerasuolo <cerasuolodomenico@gmail.com>2023-06-14 16:31:22 +0200
committerAndrew Morton <akpm@linux-foundation.org>2023-06-20 01:19:33 +0200
commit418fd29d9de53b143e28a07430e08dd414b74c3d (patch)
tree6b0623257b4c5a129d8956b00da741000bddb0fb /drivers/block/zram/zram_drv.c
parentmm: kill lock|unlock_page_memcg() (diff)
downloadlinux-418fd29d9de53b143e28a07430e08dd414b74c3d.tar.xz
linux-418fd29d9de53b143e28a07430e08dd414b74c3d.zip
mm: zswap: invaldiate entry after writeback
When an entry started writeback, it used to be invalidated with ref count logic alone, meaning that it would stay on the tree until all references were put. The problem with this behavior is that as soon as the writeback started, the ownership of the data held by the entry is passed to the swapcache and should not be left in zswap too. Currently there are no known issues because of this, but this change explicitly invalidates an entry that started writeback to reduce opportunities for future bugs. This patch is a follow up on the series titled "mm: zswap: move writeback LRU from zpool to zswap" + commit f090b7949768("mm: zswap: support exclusive loads"). Link: https://lkml.kernel.org/r/20230614143122.74471-1-cerasuolodomenico@gmail.com Signed-off-by: Domenico Cerasuolo <cerasuolodomenico@gmail.com> Suggested-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Dan Streetman <ddstreet@ieee.org> Cc: Nhat Pham <nphamcs@gmail.com> Cc: Seth Jennings <sjenning@redhat.com> Cc: Vitaly Wool <vitaly.wool@konsulko.com> Cc: Yosry Ahmed <yosryahmed@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/block/zram/zram_drv.c')
0 files changed, 0 insertions, 0 deletions