[PATCH] cachefiles: fix dentry leak in cachefiles_open_file()

Baokun Li libaokun at huaweicloud.com
Thu Aug 29 11:43:23 AEST 2024


Hi David,

On 2024/8/29 0:14, David Howells wrote:
> Baokun Li <libaokun at huaweicloud.com> wrote:
>
>>> You couldn't do that anyway, since kernel_file_open() steals the caller's ref
>>> if successful.
>> Ignoring kernel_file_open(), we now put a reference count of the dentry
>> whether cachefiles_open_file() returns true or false.
> Actually, I'm wrong kernel_file_open() doesn't steal a ref.
>
> David
>
>
Thanks for confirming this.
I will send a new version using the new solution.


Cheers,
Baokun



More information about the Linux-erofs mailing list