On 12/2/21 7:55 PM, Pavel Begunkov wrote: > On 12/1/21 05:51, Stefan Roesch wrote: >> This adds support to io_uring for the fsetxattr and setxattr API. > > io_uring part (4/5 and 5/5) look sane, just one comments below > > >> Signed-off-by: Stefan Roesch <shr@xxxxxx> >> --- >> fs/io_uring.c | 174 ++++++++++++++++++++++++++++++++++ >> include/uapi/linux/io_uring.h | 6 +- >> 2 files changed, 179 insertions(+), 1 deletion(-) >> >> diff --git a/fs/io_uring.c b/fs/io_uring.c >> index 568729677e25..9d977bf243fd 100644 >> --- a/fs/io_uring.c >> +++ b/fs/io_uring.c > [...] >> +static int io_fsetxattr_prep(struct io_kiocb *req, >> + const struct io_uring_sqe *sqe) >> +{ >> + if (!req->file) >> + return -EBADF; > > No need, io_init_req() will fail the request if it can't get a file. > Same for fgetxattr. Thanks for the review Pavel, I'll make the change. > > >> + >> + return __io_setxattr_prep(req, sqe, file_mnt_user_ns(req->file)); >> +} >> + >