[Devel] [PATCH RHEL7 COMMIT] connector: remove redundant input callback from cn_dev

Konstantin Khorenko khorenko at virtuozzo.com
Thu Aug 31 17:40:27 MSK 2017


The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.35.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.35.5
------>
commit b36f8c16abd69f33268c7b57613f529252a28075
Author: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Date:   Thu Aug 31 17:40:27 2017 +0300

    connector: remove redundant input callback from cn_dev
    
    Patchset description:
    proc connector: containerize on per-VE basis
    
    This feature is requested by customer and needed by cgred service.
    
    https://jira.sw.ru/browse/PSBM-60227
    
    What's ne in v2:
    1) Containerization is done on per-VE basis
    2) Event in container is also sent to VE#0
    
    Stanislav Kinsburskiy (27):
          connector: remove redundant input callback from cn_dev
          connector: store all private data on VE structure
          connector: introduce VE-aware get_cdev() helper
          connector: per-ve init and fini helpers introduced
          connector: use device stored in VE
          connector: per-ve helpers intoruduced
          connector: take cn_already_initialized from VE
          proc connector: generic proc_event_connector() helper introduced
          proc connector: use generic event helper for fork event
          proc connector: use generic event helper for exec event
          proc connector: use generic event helper for id event
          proc connector: use generic event helper for sid event
          proc connector: use generic event helper for ptrace event
          proc connector: use generic event helper for comm event
          proc connector: use generic event helper for coredump event
          proc connector: use generic event helper for exit event
          proc connector: add pid namespace awareness
          proc connector: add per-ve init and fini foutines
          proc connector: call proc-related init and fini routines explicitly
          proc connector: take number of listeners and per-cpu conters from VE
          proc connector: pass VE to event fillers
          proc connector: take namespaces from VE
          proc connector: use per-ve netlink sender helper
          proc connector: send events to both VEs if not in VE#0
          connector: containerize "connector" proc entry
          connector: take VE from socket upon callback
          connector: add VE SS hook
    
    =====================
    This patch description:
    
    A small cleanup: this callback is never used.
    
    Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
    Reviewed-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
 drivers/connector/connector.c | 6 +-----
 include/linux/connector.h     | 1 -
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 0daa11e..da26064 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -253,16 +253,12 @@ static const struct file_operations cn_file_ops = {
 	.release = single_release
 };
 
-static struct cn_dev cdev = {
-	.input   = cn_rx_skb,
-};
-
 static int cn_init(void)
 {
 	struct cn_dev *dev = &cdev;
 	struct netlink_kernel_cfg cfg = {
 		.groups	= CN_NETLINK_USERS + 0xf,
-		.input	= dev->input,
+		.input	= cn_rx_skb,
 	};
 
 	dev->nls = netlink_kernel_create(&init_net, NETLINK_CONNECTOR, &cfg);
diff --git a/include/linux/connector.h b/include/linux/connector.h
index b2b5a41..4c4d2b9 100644
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -63,7 +63,6 @@ struct cn_dev {
 
 	u32 seq, groups;
 	struct sock *nls;
-	void (*input) (struct sk_buff *skb);
 
 	struct cn_queue_dev *cbdev;
 };


More information about the Devel mailing list