lkml.org 
[lkml]   [2020]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2 2/9] fs: Introduce i_blocks_per_page
On Tue, Sep 15, 2020 at 03:40:52PM +0000, David Laight wrote:
> > @@ -147,7 +147,7 @@ iomap_iop_set_range_uptodate(struct page *page, unsigned off, unsigned len)
> > unsigned int i;
> >
> > spin_lock_irqsave(&iop->uptodate_lock, flags);
> > - for (i = 0; i < PAGE_SIZE / i_blocksize(inode); i++) {
> > + for (i = 0; i < i_blocks_per_page(inode, page); i++) {
>
> You probably don't want to call the helper every time
> around the loop.

This is a classic example of focusing on the details and missing the
larger picture. We don't want the loop at all, and if you'd kept reading
the patch series, you'd see it disappear later.

\
 
 \ /
  Last update: 2020-09-16 00:41    [W:0.091 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site