From mboxrd@z Thu Jan 1 00:00:00 1970 From: green at linuxhacker.ru Date: Tue, 16 Feb 2016 00:46:41 -0500 Subject: [lustre-devel] [PATCH 09/45] staging/lustre: Remove server code from class_get_type() In-Reply-To: <1455601637-3847710-1-git-send-email-green@linuxhacker.ru> References: <1455601637-3847710-1-git-send-email-green@linuxhacker.ru> Message-ID: <1455601637-3847710-10-git-send-email-green@linuxhacker.ru> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Lustre Development List , Oleg Drokin From: Oleg Drokin class_get_type has some references to various server modules that could not exist on the server, so get rid of them. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/obdclass/genops.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/genops.c b/drivers/staging/lustre/lustre/obdclass/genops.c index 5665655..1cb68df 100644 --- a/drivers/staging/lustre/lustre/obdclass/genops.c +++ b/drivers/staging/lustre/lustre/obdclass/genops.c @@ -113,15 +113,6 @@ static struct obd_type *class_get_type(const char *name) if (!type) { const char *modname = name; - if (strcmp(modname, "obdfilter") == 0) - modname = "ofd"; - - if (strcmp(modname, LUSTRE_LWP_NAME) == 0) - modname = LUSTRE_OSP_NAME; - - if (!strncmp(modname, LUSTRE_MDS_NAME, strlen(LUSTRE_MDS_NAME))) - modname = LUSTRE_MDT_NAME; - if (!request_module("%s", modname)) { CDEBUG(D_INFO, "Loaded module '%s'\n", modname); type = class_search_type(name); -- 2.1.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753636AbcBPFsH (ORCPT ); Tue, 16 Feb 2016 00:48:07 -0500 Received: from linuxhacker.ru ([217.76.32.60]:48390 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753579AbcBPFsD (ORCPT ); Tue, 16 Feb 2016 00:48:03 -0500 From: green@linuxhacker.ru To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Lustre Development List , Oleg Drokin Subject: [PATCH 09/45] staging/lustre: Remove server code from class_get_type() Date: Tue, 16 Feb 2016 00:46:41 -0500 Message-Id: <1455601637-3847710-10-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1455601637-3847710-1-git-send-email-green@linuxhacker.ru> References: <1455601637-3847710-1-git-send-email-green@linuxhacker.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oleg Drokin class_get_type has some references to various server modules that could not exist on the server, so get rid of them. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/obdclass/genops.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/genops.c b/drivers/staging/lustre/lustre/obdclass/genops.c index 5665655..1cb68df 100644 --- a/drivers/staging/lustre/lustre/obdclass/genops.c +++ b/drivers/staging/lustre/lustre/obdclass/genops.c @@ -113,15 +113,6 @@ static struct obd_type *class_get_type(const char *name) if (!type) { const char *modname = name; - if (strcmp(modname, "obdfilter") == 0) - modname = "ofd"; - - if (strcmp(modname, LUSTRE_LWP_NAME) == 0) - modname = LUSTRE_OSP_NAME; - - if (!strncmp(modname, LUSTRE_MDS_NAME, strlen(LUSTRE_MDS_NAME))) - modname = LUSTRE_MDT_NAME; - if (!request_module("%s", modname)) { CDEBUG(D_INFO, "Loaded module '%s'\n", modname); type = class_search_type(name); -- 2.1.0