Re: [PATCH] fault-inject: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops

From: zhong jiang
Date: Wed Oct 30 2019 - 05:31:52 EST


On 2019/10/30 17:10, Greg KH wrote:
> On Wed, Oct 30, 2019 at 04:22:36PM +0800, zhong jiang wrote:
>> It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file
>> operation rather than DEFINE_SIMPLE_ATTRIBUTE.
> Why does this matter? What does this change? You are changing how some
> of the file reference counting works now, are you sure this is ok?
I think that it is more correct to use DEFINE_DEBUGFS_ATTRIBUTE(), since they are debugfs attrs.
It is designed and defined for debugfs fops.

Of course, Use DEFINE_SIMPLE_ATTRIBUTE here to define debugfs attrs is feasible functionally.

Thanks,
zhong jiang
> thanks,
>
> greg k-h
>
> .
>