linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	Paolo Bonzini <pbonzini@redhat.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH 6/6] fs: Convert error_remove_page to error_remove_folio
Date: Fri, 17 Nov 2023 18:14:55 +0000	[thread overview]
Message-ID: <ZVetnzjkLO99gXNB@casper.infradead.org> (raw)
In-Reply-To: <20231117092833.f143fa4bbf0abfbd2e58661d@linux-foundation.org>

On Fri, Nov 17, 2023 at 09:28:33AM -0800, Andrew Morton wrote:
> >  virt/kvm/guest_memfd.c                |  9 +++++----
> 
> virt/kvm/guest_memfd.c exists only in the KVM tree (and hence
> linux-next).  So I assume Stephen will use the change from this patch
> when doing his resolution.

Guilty of developing against linux-next ;-)  Sorry, I didn't notice it
depended on something else; thanks for alerting Stephen.

> This:
> 
> --- a/virt/kvm/guest_memfd.c
> +++ b/virt/kvm/guest_memfd.c
> @@ -267,7 +267,8 @@ static int kvm_gmem_migrate_folio(struct address_space *mapping,
>  	return -EINVAL;
>  }
>  
> -static int kvm_gmem_error_page(struct address_space *mapping, struct page *page)
> +static int kvm_gmem_error_folio(struct address_space *mapping,
> +		struct folio *folio)
>  {
>  	struct list_head *gmem_list = &mapping->private_list;
>  	struct kvm_gmem *gmem;
> @@ -275,8 +276,8 @@ static int kvm_gmem_error_page(struct address_space *mapping, struct page *page)
>  
>  	filemap_invalidate_lock_shared(mapping);
>  
> -	start = page->index;
> -	end = start + thp_nr_pages(page);
> +	start = folio->index;
> +	end = start + folio_nr_pages(folio);
>  
>  	list_for_each_entry(gmem, gmem_list, entry)
>  		kvm_gmem_invalidate_begin(gmem, start, end);
> @@ -303,7 +304,7 @@ static const struct address_space_operations kvm_gmem_aops = {
>  #ifdef CONFIG_MIGRATION
>  	.migrate_folio	= kvm_gmem_migrate_folio,
>  #endif
> -	.error_remove_page = kvm_gmem_error_page,
> +	.error_remove_folio = kvm_gmem_error_folio,
>  };
>  
>  static int kvm_gmem_getattr(struct mnt_idmap *idmap, const struct path *path,
> -- 
> 2.42.0

  reply	other threads:[~2023-11-17 18:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-17 16:14 [PATCH 0/6] Convert aops->error_remove_page to ->error_remove_folio Matthew Wilcox (Oracle)
2023-11-17 16:14 ` [PATCH 1/6] memory-failure: Use a folio in me_pagecache_clean() Matthew Wilcox (Oracle)
2023-11-17 16:14 ` [PATCH 2/6] memory-failure: Use a folio in me_pagecache_dirty() Matthew Wilcox (Oracle)
2023-11-17 16:14 ` [PATCH 3/6] memory-failure: Convert delete_from_lru_cache() to take a folio Matthew Wilcox (Oracle)
2023-11-17 16:14 ` [PATCH 4/6] memory-failure: Use a folio in me_huge_page() Matthew Wilcox (Oracle)
2023-11-17 16:14 ` [PATCH 5/6] memory-failure: Convert truncate_error_page to truncate_error_folio Matthew Wilcox (Oracle)
2023-11-17 16:14 ` [PATCH 6/6] fs: Convert error_remove_page to error_remove_folio Matthew Wilcox (Oracle)
2023-11-17 17:28   ` Andrew Morton
2023-11-17 18:14     ` Matthew Wilcox [this message]
2023-11-20  0:33     ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZVetnzjkLO99gXNB@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=naoya.horiguchi@nec.com \
    --cc=pbonzini@redhat.com \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).