[Devel] [PATCH RHEL7 COMMIT] Revert "ve/sysfs: allow symlinks between tagged and generic directories"
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Dec 27 18:54:10 MSK 2017
The commit is pushed to "branch-rh7-3.10.0-693.11.1.vz7.39.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.11.1.vz7.39.9
------>
commit e3fd745c618eeb2688585e04413e8aca8e6e34b6
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date: Wed Dec 27 18:46:45 2017 +0300
Revert "ve/sysfs: allow symlinks between tagged and generic directories"
This reverts commit bb0a8e2b8f53ee92687e99061af8d3fd5d00ee72.
This is a leftover, drop it.
https://jira.sw.ru/browse/PSBM-72008
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
fs/sysfs/dir.c | 8 ++++----
fs/sysfs/symlink.c | 4 ----
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 9d307fa4cb10..dd34b5932ce6 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -468,14 +468,14 @@ int __sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd)
{
struct sysfs_inode_attrs *ps_iattr;
int ret;
-#ifndef CONFIG_VE
+
if (!!sysfs_ns_type(acxt->parent_sd) != !!sd->s_ns) {
WARN(1, KERN_WARNING "sysfs: ns %s in '%s' for '%s'\n",
sysfs_ns_type(acxt->parent_sd)? "required": "invalid",
acxt->parent_sd->s_name, sd->s_name);
return -EINVAL;
}
-#endif
+
sd->s_hash = sysfs_name_hash(sd->s_ns, sd->s_name);
sd->s_parent = sysfs_get(acxt->parent_sd);
@@ -643,14 +643,14 @@ struct sysfs_dirent *sysfs_find_dirent(struct sysfs_dirent *parent_sd,
{
struct rb_node *node = parent_sd->s_dir.children.rb_node;
unsigned int hash;
-#ifndef CONFIG_VE
+
if (!!sysfs_ns_type(parent_sd) != !!ns) {
WARN(1, KERN_WARNING "sysfs: ns %s in '%s' for '%s'\n",
sysfs_ns_type(parent_sd)? "required": "invalid",
parent_sd->s_name, name);
return NULL;
}
-#endif
+
hash = sysfs_name_hash(ns, name);
while (node) {
struct sysfs_dirent *sd;
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
index fa1f4baddfba..8c940df97a52 100644
--- a/fs/sysfs/symlink.c
+++ b/fs/sysfs/symlink.c
@@ -59,10 +59,6 @@ static int sysfs_do_create_link_sd(struct sysfs_dirent *parent_sd,
sysfs_addrm_start(&acxt, parent_sd);
/* Symlinks must be between directories with the same ns_type */
if (!ns_type ||
-#ifdef CONFIG_VE
- /* or if target doesn't have ns_type */
- !sysfs_ns_type(sd->s_symlink.target_sd->s_parent) ||
-#endif
(ns_type == sysfs_ns_type(sd->s_symlink.target_sd->s_parent))) {
if (warn)
error = sysfs_add_one(&acxt, sd);
More information about the Devel
mailing list