lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 12 Dec 2008 01:37:02 -0800
From:	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>
To:	"Linux-iSCSI.org Target Dev" 
	<linux-iscsi-target-dev@...glegroups.com>
Cc:	linux-scsi <linux-scsi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Joel Becker <joel.becker@...cle.com>
Subject: [PATCH] [Target_Core_Mod/ConfigFS 12/12]: Remove
	do_configfs_mkdir() and do_configfs_rmdir()

>>From 79f98e53a0b4906cd5b4bfadf2d65345c3dcf8a5 Mon Sep 17 00:00:00 2001
From: Nicholas Bellinger <nab@...ux-iscsi.org>
Date: Fri, 12 Dec 2008 01:07:06 -0800
Subject: [PATCH] [Target_Core_Mod/ConfigFS]: Remove do_configfs_mkdir() and do_configfs_rmdir()

This patch removes the temporary debug functions used for Target_Core_Mod and
LIO-Target v3.0 bringup, as required by the ConfigFS maintainer.

Signed-off-by: Nicholas A. Bellinger <nab@...ux-iscsi.org>
---
 drivers/lio-core/target_core_configfs.c |  122 +------------------------------
 1 files changed, 4 insertions(+), 118 deletions(-)

diff --git a/drivers/lio-core/target_core_configfs.c b/drivers/lio-core/target_core_configfs.c
index 77950c1..0fceeab 100644
--- a/drivers/lio-core/target_core_configfs.c
+++ b/drivers/lio-core/target_core_configfs.c
@@ -34,19 +34,11 @@
 #include <linux/syscalls.h>
 #include <linux/configfs.h>
 
-#include <iscsi_debug.h>
-#include <iscsi_lists.h>
-#include <iscsi_protocol.h>
-#include <iscsi_debug_opcodes.h>
-#include <iscsi_target_core.h>
 #include <target_core_base.h>
-#include <iscsi_target_error.h>
 #include <target_core_device.h>
-#include <iscsi_target_device.h>
 #include <target_core_hba.h>
 #include <target_core_plugin.h>
 #include <target_core_transport.h>
-#include <iscsi_target.h>
 
 #ifdef SNMP_SUPPORT
 #include <linux/proc_fs.h>
@@ -325,116 +317,6 @@ extern struct config_item *target_fabric_configfs_find_by_name (
 	return(fabric);
 }
 
-static long do_configfs_mkdir (struct config_item *item, const char *path, int mode)
-{
-//	char *s;
-	struct dentry *dentry;
-	struct nameidata nd;
-	int error = 0;	
-#if 0
-	s = __getname();
-	if (IS_ERR(s)) {
-		printk("__getname() failed\n");
-		return(PTR_ERR(s));
-	}
-#endif
-	if ((error = path_lookup(path, LOOKUP_PARENT, &nd))) {
-		printk("path_lookup() failed for %s, error: %d\n", path, error);
-//		putname(s);
-		return(error);
-	}
-
-	dentry = lookup_create(&nd, 1);
-	error = PTR_ERR(dentry);
-	if (IS_ERR(dentry)) {
-		printk("lookup_create() returned error: %d\n", error);
-		goto out;
-	}
-
-	printk("Calling vfs_mkdir() d_inode: %p dentry: %p\n",
-		item->ci_dentry->d_inode, dentry);
-
-	error = vfs_mkdir(item->ci_dentry->d_inode, dentry, mode);
-	
-	dput(dentry);
-out:
-	mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
-	path_put(&nd.path);
-//	putname(s);
-
-	return(error);
-}
-
-#if 1
-
-/*
- * fs/namei.c:lookup_hash() is not defined as EXPORT_SYMBOL()
- */
-extern struct dentry *lookup_hash(struct nameidata *);
-
-static long do_configfs_rmdir (struct config_item *item, const char *path)
-{
-	struct dentry *dentry;
-	struct nameidata nd;
-	int error = 0;
-	
-	if ((error = path_lookup(path, LOOKUP_PARENT, &nd))) {
-		printk("path_lookup() failed for %s, error: %d\n", path, error);
-		return(error);
-	}
-
-	/*
-	 * lookup_hash() is not exported from fs/namei.c..
-	 */
-	mutex_lock_nested(&nd.path.dentry->d_inode->i_mutex, I_MUTEX_PARENT);
-	dentry = lookup_hash(&nd);
-	error = PTR_ERR(dentry);
-	if (IS_ERR(dentry)) {
-		printk("lookup_hash() returned error: %d\n", error);
-		goto unlock;
-	}
-
-	printk("Calling vfs_rmdir() d_inode: %p dentry: %p\n",
-		item->ci_dentry->d_inode, dentry);
-
-	error = vfs_rmdir(item->ci_dentry->d_inode, dentry);
-
-	dput(dentry);
-unlock:
-	mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
-	path_put(&nd.path);
-
-	return(error);
-}
-
-#else
-
-static long do_configfs_rmdir (struct config_item *item, const char *path)
-{
-	struct dentry *dentry;
-	int error = 0;
-
-	mutex_lock(&item->ci_dentry->d_inode->i_mutex);	
-	dentry = lookup_one_len(path, item->ci_dentry, strlen(path));
-	error = PTR_ERR(dentry);
-	if (IS_ERR(dentry)) {
-		printk("lookup_one_len() returned error: %d\n", error);
-		goto unlock;
-	}
-
-	printk("Calling vfs_rmdir() d_inode: %p dentry: %p\n",
-		item->ci_dentry->d_inode, dentry);
-	error = vfs_rmdir(item->ci_dentry->d_inode, dentry);
-	printk("vfs_rmdir() returned %d\n", error);
-	
-	dput(dentry);
-unlock:
-	mutex_unlock(&item->ci_dentry->d_inode->i_mutex);
-	return(error);
-}
-
-#endif
-
 /*
  * Called 2nd from fabric module with returned parameter of
  * struct target_fabric_configfs * from target_fabric_configfs_init().
@@ -1112,6 +994,10 @@ extern int target_core_init_configfs (void)
 #endif
 	int ret;
 
+	printk("TARGET_CORE[0]: Loading Generic Kernel Storage Engine: %s on %s/%s"
+		" on "UTS_RELEASE"\n", TARGET_CORE_VERSION, utsname()->sysname,
+		utsname()->machine);
+
 	subsys = target_core_subsystem[0];	
 	config_group_init(&subsys->su_group);
 	mutex_init(&subsys->su_mutex);
-- 
1.5.4.1



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ