Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

resctrl: get rid of pointless debugfs_file_{get,put}()

->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@zeniv.linux.org.uk>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lore.kernel.org/r/20250702211650.GD3406663@ZenIV
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Al Viro and committed by
Greg Kroah-Hartman
460e36ee 8009fb75

-4
-4
fs/resctrl/pseudo_lock.c
··· 764 764 if (ret == 0) { 765 765 if (sel != 1 && sel != 2 && sel != 3) 766 766 return -EINVAL; 767 - ret = debugfs_file_get(file->f_path.dentry); 768 - if (ret) 769 - return ret; 770 767 ret = pseudo_lock_measure_cycles(rdtgrp, sel); 771 768 if (ret == 0) 772 769 ret = count; 773 - debugfs_file_put(file->f_path.dentry); 774 770 } 775 771 776 772 return ret;