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 Wed, Jul 02, 2025 at 10:16:50PM +0100, Al Viro wrote:

+Reinette

> ->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
> 




[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