Re: [PATCH v2 2/2] io_uring: add support for ftruncate

Jens Axboe
2024-01-23T15:50:08Z

On 1/23/24 4:33 AM, Tony Solomonik wrote:
> +int io_ftruncate_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
> +{
> + struct io_ftrunc *ft = io_kiocb_to_cmd(req, struct io_ftrunc);
> +
> + if (sqe->addr || sqe->rw_flags || sqe->buf_index || sqe->splice_fd_in)
> + return -EINVAL;

Since you're not using len anymore, that should be included in these
checks, and addr3.

--
Jens Axboe