Hi Rodrigo, ...
> > @@ -441,12 +441,12 @@ shmem_pwrite(struct drm_i915_gem_object *obj, > > written = file->f_op->write_iter(&kiocb, &iter); > > BUG_ON(written == -EIOCBQUEUED); > > > > - if (written != size) > > - return -EIO; > > - > > if (written < 0) > > return written; > > > > + if (written != size) > > + return -EIO; > > That's awkward... > > I mean, you are right that we cannot overwrite what is returned from the > write_iter function. But perhaps this != check here should be before? > > Or it at least deserves a comment in the code telling what's the intent > here. why != size is -EIO... but it was already written :/ The check (written < 0) is completely useless after (written != size), so that I think the patch is correct. Andi > > + > > return 0; > > } > > > > -- > > 2.34.1