On Thu, Oct 26, 2023 at 03:18:40AM +0100, Al Viro wrote: > [in viro/vfs.git#fixes at the moment] > ->ki_pos value is unreliable in such cases. For an obvious example, > consider O_DSYNC write - we feed the data to page cache and start IO, > then we make sure it's completed. Update of ->ki_pos is dealt with > by the first part; failure in the second ends up with negative value > returned _and_ ->ki_pos left advanced as if sync had been successful. > In the same situation write(2) does not advance the file position > at all. > > Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx> > --- Looks good to me, Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>