lkml.org 
[lkml]   [2017]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/16] fs: fix kernel_write prototype
On Wed, Aug 30, 2017 at 04:39:00PM +0100, Al Viro wrote:
> On Wed, Aug 30, 2017 at 04:59:57PM +0200, Christoph Hellwig wrote:
>
> > for (prot = 0; prot < prot_length;) {
> > sector_t len = min_t(sector_t, bufsize, prot_length - prot);
> > - ssize_t ret = kernel_write(prot_fd, buf, len, pos + prot);
> > + ssize_t ret = kernel_write(prot_fd, buf, len, &pos);
> >
> > if (ret != len) {
> > pr_err("vfs_write to prot file failed: %zd\n", ret);
> > return ret < 0 ? ret : -ENODEV;
> > }
> > - prot += ret;
> > }
>
> And that loop will terminate because of...? IOW, the same bug class as in
> the kernel_read() patch.

Also fixed.

\
 
 \ /
  Last update: 2017-09-01 12:41    [W:0.083 / U:8.104 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site