]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mm: do not reclaim private data from pinned page
authorJan Kara <jack@suse.cz>
Fri, 28 Apr 2023 12:41:40 +0000 (14:41 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 Jul 2023 10:17:13 +0000 (12:17 +0200)
commite27a24cae406562d8a9b9886b69d19379851459c
treea5107ef710395b78d52ef733f191c5b023b5c132
parent230269a52b43788872f5f991a11389c5945b4ed5
mm: do not reclaim private data from pinned page

BugLink: https://bugs.launchpad.net/bugs/2025067
commit d824ec2a154677f63c56cc71ffe4578274f6e32e upstream.

If the page is pinned, there's no point in trying to reclaim it.
Furthermore if the page is from the page cache we don't want to reclaim
fs-private data from the page because the pinning process may be writing
to the page at any time and reclaiming fs private info on a dirty page can
upset the filesystem (see link below).

Link: https://lore.kernel.org/linux-mm/20180103100430.GE4911@quack2.suse.cz
Link: https://lkml.kernel.org/r/20230428124140.30166-1-jack@suse.cz
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Lorenzo Stoakes <lstoakes@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
mm/vmscan.c