lkml.org 
[lkml]   [2021]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 18/21] iomap: Convert iomap_add_to_ioend to take a folio
On Mon, Nov 01, 2021 at 08:39:26PM +0000, Matthew Wilcox (Oracle) wrote:
> @@ -1431,11 +1428,9 @@ iomap_do_writepage(struct page *page, struct writeback_control *wbc, void *data)
> * | desired writeback range | see else |
> * ---------------------------------^------------------|
> */
> - offset = i_size_read(inode);
> - end_index = offset >> PAGE_SHIFT;
> - if (page->index < end_index)
> - end_offset = (loff_t)(page->index + 1) << PAGE_SHIFT;
> - else {
> + isize = i_size_read(inode);
> + end_pos = folio_pos(folio) + folio_size(folio);
> + if (end_pos - 1 >= isize) {

Looking at the code not part of the context this looks fine. But I
really wonder if this (and also the blocks change above) would be
better off being split into separate, clearly documented patches.

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

\
 
 \ /
  Last update: 2021-11-02 08:27    [W:0.180 / U:5.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site