Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1622126

Re: [PATCH v2 06/17] mm: doc comment for scary spot in write_one_page

From Jeff Layton <jlayton@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 06/17] mm: doc comment for scary spot in write_one_page
Date 2017-04-12 15:10 +0200
Message-ID <tvqc1-4QP-3@gated-at.bofh.it> (permalink)
References <tvpfY-4hS-3@gated-at.bofh.it> <tvpfY-4hS-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 2017-04-12 at 08:06 -0400, Jeff Layton wrote:
> Not sure what to do here just yet.
> 
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> ---
>  mm/page-writeback.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index de0dbf12e2c1..3ac8399dc984 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -2388,6 +2388,12 @@ int write_one_page(struct page *page)
>  		ret = mapping->a_ops->writepage(page, &wbc);
>  		if (ret == 0) {
>  			wait_on_page_writeback(page);
> +			/*
> +			 * FIXME: is this racy? What guarantees that PG_error
> +			 * will still be set once we get around to checking it?
> +			 * What if writeback fails, but then a read is issued
> +			 * before we check this, and that calls ClearPageError?
> +			 */
>  			if (PageError(page))
>  				ret = -EIO;
>  		}

Ahh, we are always under the page lock here, and this is generally used
for writing out directory pages anyway. I'm fine with dropping this
patch unless someone else sees a problem here.
-- 
Jeff Layton <jlayton@redhat.com>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 06/17] mm: doc comment for scary spot in write_one_page Jeff Layton <jlayton@redhat.com> - 2017-04-12 14:10 +0200
  Re: [PATCH v2 06/17] mm: doc comment for scary spot in  write_one_page Jeff Layton <jlayton@redhat.com> - 2017-04-12 15:10 +0200
    Re: [PATCH v2 06/17] mm: doc comment for scary spot in write_one_page Matthew Wilcox <willy@infradead.org> - 2017-04-12 16:40 +0200
      Re: [PATCH v2 06/17] mm: doc comment for scary spot in  write_one_page Jeff Layton <jlayton@redhat.com> - 2017-04-12 18:00 +0200
        Re: [PATCH v2 06/17] mm: doc comment for scary spot in write_one_page NeilBrown <neilb@suse.com> - 2017-04-12 23:40 +0200
          Re: [PATCH v2 06/17] mm: doc comment for scary spot in  write_one_page Jeff Layton <jlayton@redhat.com> - 2017-04-13 01:00 +0200

csiph-web