mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 06:41:39 -04:00
Merge tag 'kvm-x86-gmem-7.1' of https://github.com/kvm-x86/linux into HEAD
KVM guest_memfd changes for 7.1 Don't mark guest_memfd folios as accessed, as guest_memfd doesn't support reclaim, the memory is unevictable, and there is no storage to write back to.
This commit is contained in:
@@ -126,14 +126,13 @@ static struct folio *kvm_gmem_get_folio(struct inode *inode, pgoff_t index)
|
||||
* Fast-path: See if folio is already present in mapping to avoid
|
||||
* policy_lookup.
|
||||
*/
|
||||
folio = __filemap_get_folio(inode->i_mapping, index,
|
||||
FGP_LOCK | FGP_ACCESSED, 0);
|
||||
folio = filemap_lock_folio(inode->i_mapping, index);
|
||||
if (!IS_ERR(folio))
|
||||
return folio;
|
||||
|
||||
policy = mpol_shared_policy_lookup(&GMEM_I(inode)->policy, index);
|
||||
folio = __filemap_get_folio_mpol(inode->i_mapping, index,
|
||||
FGP_LOCK | FGP_ACCESSED | FGP_CREAT,
|
||||
FGP_LOCK | FGP_CREAT,
|
||||
mapping_gfp_mask(inode->i_mapping), policy);
|
||||
mpol_cond_put(policy);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user