[PATCH 1/3] nvme: decouple nvme_ctrl_get_by_path()

Logan Gunthorpe logang at deltatee.com
Tue Sep 8 11:36:37 EDT 2020



On 2020-09-05 4:57 p.m., Chaitanya Kulkarni wrote:
> On 9/5/20 00:20, Christoph Hellwig wrote:
>>> I still don't really like this idea. No need to keep a reference to a
>>> whole other file.
> 
> File reference open/close is coupled with ctrl refcnt and module refcnt.
> What is a problem with keeping the file reference open ?

I find it a bit distasteful to keep an extra pointer and object around
when all we need is to add a module reference.

>> We could still lift the filp_open into the caller, but drop the file
>> reference right after we got the controller reference.

I'm not opposed to lifting the filp_open() into the caller if it makes
the code cleaner. I just think dropping the file reference should be kept.

Logan



More information about the Linux-nvme mailing list