Re: [PATCH 07/48] iov_iter: Convert iter_xarray to use folios

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

 



On Thu, Dec 23, 2021 at 03:24:21PM +0000, David Howells wrote:
> > > +		while (offset < folio_size(folio)) {		\
> > 
> > Nit: I'd be tempted to use a for loop on offset here.
> 
> A while-loop makes more sense here.  The adjustment you need for offset
> (ie. len) is overwritten after offset is altered at the end of the loop:
> 
> > +			offset += len;				\
> > +			len = PAGE_SIZE;			\
> >  		}						\
> 
> So you'd have to move both of these into the for-incrementor expression, in
> addition to moving in the initialiser expression, making the thing less
> readable.

Ok.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux