lkml.org 
[lkml]   [2020]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 17/25] iomap: Support large pages in write paths
On Tue, Feb 11, 2020 at 08:18:37PM -0800, Matthew Wilcox wrote:
> Also simplify the logic in iomap_do_writepage() for determining end of
> file.

> * ---------------------------------^------------------|
> */
> 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 {
> + end_offset = file_offset_of_next_page(page);
> +
> + if (end_offset > offset) {

Nit: can you drop the empty line here? Maybe it is just a pet peeve
of mine, but I hate empty line between a variable assignment, and a
use that is directly related to it.

Also it might be worth to preload this as a separate patch as it
is a very nice but not completely obvious cleanup that deserves to
stand out.

\
 
 \ /
  Last update: 2020-02-12 09:18    [W:1.865 / U:2.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site