From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759072AbYLLJhY (ORCPT ); Fri, 12 Dec 2008 04:37:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757817AbYLLJhH (ORCPT ); Fri, 12 Dec 2008 04:37:07 -0500 Received: from smtp122.sbc.mail.sp1.yahoo.com ([69.147.64.95]:20179 "HELO smtp122.sbc.mail.sp1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757498AbYLLJhF (ORCPT ); Fri, 12 Dec 2008 04:37:05 -0500 X-YMail-OSG: EfUG6k4VM1mozrwIJ26esEKuuiv5nnUeBO9SIaopT2O4qopnulZGP9vtkdRz4G75qNyZyEH7rNgzFEySMPJfxlu1NESlBkiDOv91yWBu9jXbejVxXdbymlgWates1Vpmz3DnBBkP5h43wtArsq5Ix236rSqSAl5pgE9zwETo16l_CnhPq1IBvU9TJlQ- X-Yahoo-Newman-Property: ymail-3 Subject: [PATCH] [Target_Core_Mod/ConfigFS 12/12]: Remove do_configfs_mkdir() and do_configfs_rmdir() From: "Nicholas A. Bellinger" To: "Linux-iSCSI.org Target Dev" Cc: linux-scsi , LKML , Joel Becker Content-Type: text/plain Date: Fri, 12 Dec 2008 01:37:02 -0800 Message-Id: <1229074622.4153.664.camel@haakon2.linux-iscsi.org> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>From 79f98e53a0b4906cd5b4bfadf2d65345c3dcf8a5 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger 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 --- 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 #include -#include -#include -#include -#include -#include #include -#include #include -#include #include #include #include -#include #ifdef SNMP_SUPPORT #include @@ -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