On Fri, Jan 19, 2018 at 09:16:36AM -0800, Tejun Heo wrote:
> On Fri, Jan 19, 2018 at 09:18:54AM +0100, Ivan Vecera wrote:
> > Commit b7ce40cff0b9 ("kernfs: cache atomic_write_len in
> > kernfs_open_file") changes type of local variable 'len' from ssize_t
> > to size_t. This change caused that the *ppos value is updated also
> > when the previous write callback failed.
> > 
> > Mentioned snippet:
> > ...
> > len = ops->write(...); <- return value can be negative
> > ...
> > if (len > 0)           <- true here in this case
> >         *ppos += len;
> > ...
> > 
> > Fixes: b7ce40cff0b9 ("kernfs: cache atomic_write_len in kernfs_open_file")
> > Signed-off-by: Ivan Vecera <[email protected]>
> 
> Oops.
> 
>   Acked-by: Tejun Heo <[email protected]>

Applied.

Reply via email to