On 7/15/20 2:46 PM, Josh Triplett wrote: >>> + file = do_filp_open(open->dfd, open->filename, &op); >>> + if (IS_ERR(file)) { >>> + ret = PTR_ERR(file); >>> + } else { >>> + fsnotify_open(file); >>> + ret = io_sqe_files_add_new(req->ctx, open->open_fixed_idx, file); >>> + if (ret) >>> + fput(file); >>> + } >>> +err: >>> + putname(open->filename); >>> + req->flags &= ~REQ_F_NEED_CLEANUP; >>> + if (ret < 0) >>> + req_set_fail_links(req); >>> + io_cqring_add_event(req, ret); >>> + io_put_req(req); >> >> These 2 lines are better to be replace with (since 5.9): >> >> io_req_complete(req, ret); > > This was directly copied from the same code in io_openat2. You're probably using current -git or something like that, the patch would be best against for-5.9/io_uring - that's what's queued up for 5.9, and it does use io_req_complete() consistently throughout. -- Jens Axboe