Re: [PATCH 04/11] resctrl: get rid of pointless debugfs_file_{get,put}()

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

 




On 7/2/25 2:24 PM, Luck, Tony wrote:
> On Wed, Jul 02, 2025 at 10:16:50PM +0100, Al Viro wrote:
> 
> +Reinette

Thank you Tony.

> 
>> ->write() of file_operations that gets used only via debugfs_create_file()
>> is called only under debugfs_file_get()
>>
>> Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
>> ---
>>  fs/resctrl/pseudo_lock.c | 4 ----
>>  1 file changed, 4 deletions(-)
>>
>> diff --git a/fs/resctrl/pseudo_lock.c b/fs/resctrl/pseudo_lock.c
>> index ccc2f9213b4b..87bbc2605de1 100644
>> --- a/fs/resctrl/pseudo_lock.c
>> +++ b/fs/resctrl/pseudo_lock.c
>> @@ -764,13 +764,9 @@ static ssize_t pseudo_lock_measure_trigger(struct file *file,
>>  	if (ret == 0) {
>>  		if (sel != 1 && sel != 2 && sel != 3)
>>  			return -EINVAL;
>> -		ret = debugfs_file_get(file->f_path.dentry);
>> -		if (ret)
>> -			return ret;
>>  		ret = pseudo_lock_measure_cycles(rdtgrp, sel);
>>  		if (ret == 0)
>>  			ret = count;
>> -		debugfs_file_put(file->f_path.dentry);
>>  	}
>>  
>>  	return ret;
>> -- 
>> 2.39.5
>>

Thank you very much for catching and fixing this Al.

Acked-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>

How are the patches from this series expected to flow upstream?
resctrl changes usually flow upstream via tip. Would you be ok if
I pick just this patch and route it via tip or would you prefer to
keep it with this series? At this time I do not anticipate
any conflicts if this patch goes upstream via other FS changes during
this cycle.

Reinette





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux