lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <35dfe983-f916-d972-497d-269ec44cf7bf@bytedance.com>
Date:   Sun, 9 Oct 2022 17:50:58 +0800
From:   Jia Zhu <zhujia.zj@...edance.com>
To:     JeffleXu <jefflexu@...ux.alibaba.com>, dhowells@...hat.com,
        xiang@...nel.org
Cc:     linux-cachefs@...hat.com, linux-erofs@...ts.ozlabs.org,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        yinxin.x@...edance.com
Subject: Re: [External] Re: [RFC PATCH 2/5] cachefiles: extract ondemand info
 field from cachefiles_object



在 2022/10/8 17:06, JeffleXu 写道:
> 
> 
> On 8/18/22 9:52 PM, Jia Zhu wrote:
> 
>>   /*
>>    * Backing file state.
>>    */
>> @@ -67,8 +73,7 @@ struct cachefiles_object {
>>   	unsigned long			flags;
>>   #define CACHEFILES_OBJECT_USING_TMPFILE	0		/* Have an unlinked tmpfile */
>>   #ifdef CONFIG_CACHEFILES_ONDEMAND
>> -	int				ondemand_id;
>> -	enum cachefiles_object_state	state;
>> +	void				*private;
>>   #endif
>>   };
> 
> Personally I would prefer
> 
> 	struct cachefiles_object {
> 		...
> 	#ifdef CONFIG_CACHEFILES_ONDEMAND
> 		struct cachefiles_ondemand_info *private;
> 	#endif
> 	}
> 
> and
> 
>> @@ -88,6 +93,7 @@ void cachefiles_put_object(struct cachefiles_object
> *object,
>>   		ASSERTCMP(object->file, ==, NULL);
>>
>>   		kfree(object->d_name);
>> + #ifdef CONFIG_CACHEFILES_ONDEMAND
>> +		kfree(object->private);
>> + #endif
>>
>>   		cache = object->volume->cache->cache;
>>   		fscache_put_cookie(object->cookie,
> 
> so that we can get rid of CACHEFILES_ONDEMAND_OBJINFO() stuff, to make
> the code more readable.
Hi JingBo. Thanks for your review. I'll revise it in next version.
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ