On Wed, Jan 24, 2024 at 10:33:00AM +0200, Tony Solomonik wrote: > /* explicitly opened as large or we are on 64-bit box */ > - if (f.file->f_flags & O_LARGEFILE) > + if (file->f_flags & O_LARGEFILE) > small = 0; > [...] > /* Cannot ftruncate over 2^31 bytes without large file support */ > if (small && length > MAX_NON_LFS) > - goto out_putf; > + return -EINVAL; I'd leave this in do_sys_truncate(). No need for ioring to care about this ancient problem.