x86/resctrl: Clean up unused function parameter in mkdir path

Commit

  334b0f4e9b ("x86/resctrl: Fix a deadlock due to inaccurate reference")

changed the argument to rdtgroup_kn_lock_live()/rdtgroup_kn_unlock()
within mkdir_rdt_prepare(). That change resulted in an unused function
parameter to mkdir_rdt_prepare().

Clean up the unused function parameter in mkdir_rdt_prepare() and its
callers rdtgroup_mkdir_mon() and rdtgroup_mkdir_ctrl_mon().

Signed-off-by: Xiaochen Shen <xiaochen.shen@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/1578500886-21771-5-git-send-email-xiaochen.shen@intel.com
This commit is contained in:
Xiaochen Shen 2020-01-09 00:28:06 +08:00 committed by Borislav Petkov
parent 334b0f4e9b
commit 32ada3b9e0
1 changed files with 5 additions and 11 deletions

View File

@ -2644,7 +2644,6 @@ static int rdtgroup_init_alloc(struct rdtgroup *rdtgrp)
} }
static int mkdir_rdt_prepare(struct kernfs_node *parent_kn, static int mkdir_rdt_prepare(struct kernfs_node *parent_kn,
struct kernfs_node *prgrp_kn,
const char *name, umode_t mode, const char *name, umode_t mode,
enum rdt_group_type rtype, struct rdtgroup **r) enum rdt_group_type rtype, struct rdtgroup **r)
{ {
@ -2754,15 +2753,12 @@ static void mkdir_rdt_prepare_clean(struct rdtgroup *rgrp)
* to monitor a subset of tasks and cpus in its parent ctrl_mon group. * to monitor a subset of tasks and cpus in its parent ctrl_mon group.
*/ */
static int rdtgroup_mkdir_mon(struct kernfs_node *parent_kn, static int rdtgroup_mkdir_mon(struct kernfs_node *parent_kn,
struct kernfs_node *prgrp_kn, const char *name, umode_t mode)
const char *name,
umode_t mode)
{ {
struct rdtgroup *rdtgrp, *prgrp; struct rdtgroup *rdtgrp, *prgrp;
int ret; int ret;
ret = mkdir_rdt_prepare(parent_kn, prgrp_kn, name, mode, RDTMON_GROUP, ret = mkdir_rdt_prepare(parent_kn, name, mode, RDTMON_GROUP, &rdtgrp);
&rdtgrp);
if (ret) if (ret)
return ret; return ret;
@ -2784,7 +2780,6 @@ static int rdtgroup_mkdir_mon(struct kernfs_node *parent_kn,
* to allocate and monitor resources. * to allocate and monitor resources.
*/ */
static int rdtgroup_mkdir_ctrl_mon(struct kernfs_node *parent_kn, static int rdtgroup_mkdir_ctrl_mon(struct kernfs_node *parent_kn,
struct kernfs_node *prgrp_kn,
const char *name, umode_t mode) const char *name, umode_t mode)
{ {
struct rdtgroup *rdtgrp; struct rdtgroup *rdtgrp;
@ -2792,8 +2787,7 @@ static int rdtgroup_mkdir_ctrl_mon(struct kernfs_node *parent_kn,
u32 closid; u32 closid;
int ret; int ret;
ret = mkdir_rdt_prepare(parent_kn, prgrp_kn, name, mode, RDTCTRL_GROUP, ret = mkdir_rdt_prepare(parent_kn, name, mode, RDTCTRL_GROUP, &rdtgrp);
&rdtgrp);
if (ret) if (ret)
return ret; return ret;
@ -2867,14 +2861,14 @@ static int rdtgroup_mkdir(struct kernfs_node *parent_kn, const char *name,
* subdirectory * subdirectory
*/ */
if (rdt_alloc_capable && parent_kn == rdtgroup_default.kn) if (rdt_alloc_capable && parent_kn == rdtgroup_default.kn)
return rdtgroup_mkdir_ctrl_mon(parent_kn, parent_kn, name, mode); return rdtgroup_mkdir_ctrl_mon(parent_kn, name, mode);
/* /*
* If RDT monitoring is supported and the parent directory is a valid * If RDT monitoring is supported and the parent directory is a valid
* "mon_groups" directory, add a monitoring subdirectory. * "mon_groups" directory, add a monitoring subdirectory.
*/ */
if (rdt_mon_capable && is_mon_groups(parent_kn, name)) if (rdt_mon_capable && is_mon_groups(parent_kn, name))
return rdtgroup_mkdir_mon(parent_kn, parent_kn->parent, name, mode); return rdtgroup_mkdir_mon(parent_kn, name, mode);
return -EPERM; return -EPERM;
} }