Skip to content

Commit 671138a

Browse files
committed
resctrl: get rid of pointless debugfs_file_{get,put}()
JIRA: https://issues.redhat.com/browse/RHEL-118965 commit 460e36e Author: Al Viro <viro@zeniv.linux.org.uk> Date: Wed Jul 2 22:16:50 2025 +0100 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> Signed-off-by: David Arcari <darcari@redhat.com>
1 parent 3399895 commit 671138a

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

fs/resctrl/pseudo_lock.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -764,13 +764,9 @@ static ssize_t pseudo_lock_measure_trigger(struct file *file,
764764
if (ret == 0) {
765765
if (sel != 1 && sel != 2 && sel != 3)
766766
return -EINVAL;
767-
ret = debugfs_file_get(file->f_path.dentry);
768-
if (ret)
769-
return ret;
770767
ret = pseudo_lock_measure_cycles(rdtgrp, sel);
771768
if (ret == 0)
772769
ret = count;
773-
debugfs_file_put(file->f_path.dentry);
774770
}
775771

776772
return ret;

0 commit comments

Comments
 (0)