Re: [PATCH 30/31] pipe_get_pages(): switch to append_pipe()

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

 



On Sun, Jun 19, 2022 at 05:01:29AM +0100, Al Viro wrote:
> On Sat, Jun 18, 2022 at 06:35:37AM +0100, Al Viro wrote:
> 
> >  		get_page(*p++ = page);
> > -		left -= size;
> 
> Argh...
> 		if (left <= PAGE_SIZE - off)
> 			return maxsize;
> > +		left -= PAGE_SIZE - off;
> >  	}
> >  	if (!npages)
> >  		return -EFAULT;
> > -	maxsize -= left;
> > -	iov_iter_advance(i, maxsize);
> > -	return maxsize;
> > +	return maxsize - left;
> >  }
> >  
> >  static ssize_t iter_xarray_populate_pages(struct page **pages, struct xarray *xa,
> > -- 
> > 2.30.2
> > 

Might be better to have it return npages and let the caller do the usual
min(maxsize, npages * PAGE_SIZE - offset) song and dance...  Not sure.

Anyway, with these fixes it seems to survive xfstests and ltp without regressions
compared to mainline.  Updated branch force-pushed...



[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