Re: [PATCH 2/3] io_uring: Fix XArray usage in io_uring_add_task_file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 09, 2020 at 08:57:55AM -0600, Jens Axboe wrote:
> > +	if (unlikely(!cur_uring)) {
> >  		int ret;
> >  
> >  		ret = io_uring_alloc_task_context(current);
> >  		if (unlikely(ret))
> >  			return ret;
> >  	}
> 
> I think this is missing a:
> 
> 	cur_uring = current->io_uring;
> 
> after the successful io_uring_alloc_task(). I'll also rename it to tctx
> like what is used in other spots.

Quite right!  I should have woken up a little bit more before writing code.

> Apart from that, series looks good to me, thanks Matthew!

NP.  At some point, I'd like to understand a bit better how you came
to write the code the way you did, so I can improve the documentation.
Maybe I just need to strengthen the warnings to stay away from the
advanced API unless you absolutely need it.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux