for-linus-20190610
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAlz+LWMQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgprnpEACAUT8nciDtkxPxOVifg4oiqKfFvv/e/NxW EtozNfLLYTr8NH77kwFoOKCcrqQp3hBCFJ83Vp9QdL6zN8HLaXXnakovxnS0RAN+ /bwZ9OJBX/VLA7JG+dFCMoRaaboyhbV3VC+60yoRYZPRxFLF+s2H/kBjNhdJbBE6 PXo1lsa2Z88Mm4eZ6iBgO2nKQC866RvcapqzJmqgNnQpFq7aGQzcOH3wrBho7uBX ejYPOOiyvIZ3cPr0InnHy4mfp3JzyRo5SXx9FG1LAMGpI9idsU57zNaJetvfqKvL wMleSS/qtlqFciRqzGO3IQeChdNKBa2rqsuSF2HTstmBbIBu6ufJeBwmvmUQrBPH D7vj0EN3EUh06LTmqKSeDmFC65jJRKSGEMUoUUE9+0yeHKhVQo9iOBqIMkSlP5Tj kfizvbaCfxt/Dp9C3QIVeaExUkEG5GJ0iJ9oEvh6zcVAA24dfG92d8k5eneIpCLn dVR0I+u72CWq83F30TxZBca/l1Wx+hsmUmASGwZ9KyaDU1N+7xTQO7qyGMq+ZTM/ x4U2iZOHYbSrlUDv3l8nG9CuD5SJwFJUpgoCq752HZiSK8ZmM4VyQl1Ur0/dGFyG Kjs1EGUCJdjk7k3ZYI0qauL9wEucAz7ZL4FfOjo2maab9ICNYofjN75Qd60KnkJZ wr2Zn+KTmg== =yLqH -----END PGP SIGNATURE----- Merge tag 'for-linus-20190610' of git://git.kernel.dk/linux-block Pull block cgroup symlink revert from Jens Axboe: "I talked to Tejun about this offline, and he's not a huge fan of the symlink. So let's revert this for now, and Paolo can do this properly for 5.3 instead" * tag 'for-linus-20190610' of git://git.kernel.dk/linux-block: cgroup/bfq: revert bfq.weight symlink change
This commit is contained in:
commit
01ccc3ad44
|
@ -1046,8 +1046,7 @@ struct blkcg_policy blkcg_policy_bfq = {
|
|||
struct cftype bfq_blkcg_legacy_files[] = {
|
||||
{
|
||||
.name = "bfq.weight",
|
||||
.link_name = "weight",
|
||||
.flags = CFTYPE_NOT_ON_ROOT | CFTYPE_SYMLINKED,
|
||||
.flags = CFTYPE_NOT_ON_ROOT,
|
||||
.seq_show = bfq_io_show_weight,
|
||||
.write_u64 = bfq_io_set_weight_legacy,
|
||||
},
|
||||
|
@ -1167,8 +1166,7 @@ struct cftype bfq_blkcg_legacy_files[] = {
|
|||
struct cftype bfq_blkg_files[] = {
|
||||
{
|
||||
.name = "bfq.weight",
|
||||
.link_name = "weight",
|
||||
.flags = CFTYPE_NOT_ON_ROOT | CFTYPE_SYMLINKED,
|
||||
.flags = CFTYPE_NOT_ON_ROOT,
|
||||
.seq_show = bfq_io_show_weight,
|
||||
.write = bfq_io_set_weight,
|
||||
},
|
||||
|
|
|
@ -106,8 +106,6 @@ enum {
|
|||
CFTYPE_WORLD_WRITABLE = (1 << 4), /* (DON'T USE FOR NEW FILES) S_IWUGO */
|
||||
CFTYPE_DEBUG = (1 << 5), /* create when cgroup_debug */
|
||||
|
||||
CFTYPE_SYMLINKED = (1 << 6), /* pointed to by symlink too */
|
||||
|
||||
/* internal flags, do not use outside cgroup core proper */
|
||||
__CFTYPE_ONLY_ON_DFL = (1 << 16), /* only on default hierarchy */
|
||||
__CFTYPE_NOT_ON_DFL = (1 << 17), /* not on default hierarchy */
|
||||
|
@ -545,7 +543,6 @@ struct cftype {
|
|||
* end of cftype array.
|
||||
*/
|
||||
char name[MAX_CFTYPE_NAME];
|
||||
char link_name[MAX_CFTYPE_NAME];
|
||||
unsigned long private;
|
||||
|
||||
/*
|
||||
|
|
|
@ -1460,8 +1460,8 @@ struct cgroup *task_cgroup_from_root(struct task_struct *task,
|
|||
|
||||
static struct kernfs_syscall_ops cgroup_kf_syscall_ops;
|
||||
|
||||
static char *cgroup_fill_name(struct cgroup *cgrp, const struct cftype *cft,
|
||||
char *buf, bool write_link_name)
|
||||
static char *cgroup_file_name(struct cgroup *cgrp, const struct cftype *cft,
|
||||
char *buf)
|
||||
{
|
||||
struct cgroup_subsys *ss = cft->ss;
|
||||
|
||||
|
@ -1471,26 +1471,13 @@ static char *cgroup_fill_name(struct cgroup *cgrp, const struct cftype *cft,
|
|||
|
||||
snprintf(buf, CGROUP_FILE_NAME_MAX, "%s%s.%s",
|
||||
dbg, cgroup_on_dfl(cgrp) ? ss->name : ss->legacy_name,
|
||||
write_link_name ? cft->link_name : cft->name);
|
||||
cft->name);
|
||||
} else {
|
||||
strscpy(buf, write_link_name ? cft->link_name : cft->name,
|
||||
CGROUP_FILE_NAME_MAX);
|
||||
strscpy(buf, cft->name, CGROUP_FILE_NAME_MAX);
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
static char *cgroup_file_name(struct cgroup *cgrp, const struct cftype *cft,
|
||||
char *buf)
|
||||
{
|
||||
return cgroup_fill_name(cgrp, cft, buf, false);
|
||||
}
|
||||
|
||||
static char *cgroup_link_name(struct cgroup *cgrp, const struct cftype *cft,
|
||||
char *buf)
|
||||
{
|
||||
return cgroup_fill_name(cgrp, cft, buf, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* cgroup_file_mode - deduce file mode of a control file
|
||||
* @cft: the control file in question
|
||||
|
@ -1649,9 +1636,6 @@ static void cgroup_rm_file(struct cgroup *cgrp, const struct cftype *cft)
|
|||
}
|
||||
|
||||
kernfs_remove_by_name(cgrp->kn, cgroup_file_name(cgrp, cft, name));
|
||||
if (cft->flags & CFTYPE_SYMLINKED)
|
||||
kernfs_remove_by_name(cgrp->kn,
|
||||
cgroup_link_name(cgrp, cft, name));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3837,7 +3821,6 @@ static int cgroup_add_file(struct cgroup_subsys_state *css, struct cgroup *cgrp,
|
|||
{
|
||||
char name[CGROUP_FILE_NAME_MAX];
|
||||
struct kernfs_node *kn;
|
||||
struct kernfs_node *kn_link;
|
||||
struct lock_class_key *key = NULL;
|
||||
int ret;
|
||||
|
||||
|
@ -3868,14 +3851,6 @@ static int cgroup_add_file(struct cgroup_subsys_state *css, struct cgroup *cgrp,
|
|||
spin_unlock_irq(&cgroup_file_kn_lock);
|
||||
}
|
||||
|
||||
if (cft->flags & CFTYPE_SYMLINKED) {
|
||||
kn_link = kernfs_create_link(cgrp->kn,
|
||||
cgroup_link_name(cgrp, cft, name),
|
||||
kn);
|
||||
if (IS_ERR(kn_link))
|
||||
return PTR_ERR(kn_link);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue