Re:Re: [PATCH] mm/filemap.c: clear page error before actual read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




thanks for your reply:)
totally agree, it is more accurate as below, I will send the patch again, thanks.
>+	ClearPageError(page);
>        goto filler;





At 2020-03-04 00:43:17, "Matthew Wilcox" <willy@xxxxxxxxxxxxx> wrote: >On Tue, Mar 03, 2020 at 10:09:50AM -0500, Xianting Tian wrote: >> This patch is to add the calling of ClearPageError just before the >> actual read of read path of cramfs mount. > >Thank you for your patch and your analysis. I concur; an error set >on a page will not be cleared by doing a subsequent read. This is >probably an oversight; in generic_file_buffered_read(), we do: > > ClearPageError(page); > /* Start the actual read. The read will unlock the page. */ > error = mapping->a_ops->readpage(filp, page); > >and also in filemap_fault: > > ClearPageError(page); > fpin = maybe_unlock_mmap_for_io(vmf, fpin); > error = mapping->a_ops->readpage(file, page); > >That said, a freshly allocated page will not have PageError set on >it, so I would prefer to see this: > > /* Someone else locked and filled the page in a very small window */ > if (PageUptodate(page)) { > unlock_page(page); > goto out; > } >+ ClearPageError(page); > goto filler;

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux