Re: [PATCH v3 2/5] coredump: Let dump_emit() bail out on short writes

From: Oleg Nesterov
Date: Tue Aug 18 2020 - 09:41:15 EST


On 08/18, Jann Horn wrote:
>
> + if (dump_interrupted())
> + return 0;
> + n = __kernel_write(file, addr, nr, &pos);
> + if (n != nr)
> + return 0;
> + file->f_pos = pos;

Just curious, can't we simply do

__kernel_write(file, addr, nr, &file->f_pos);

and avoid "loff_t pos" ?

Oleg.