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]
Message-ID: <op.ua9a5wic03j166@prasadkr_t60p.in.ibm.com>
Date:	Fri, 16 May 2008 22:36:58 +0530
From:	"K.Prasad" <prasad@...ux.vnet.ibm.com>
To:	linux-kernel@...r.kernel.org
Cc:	dwilder@...ibm.com, axboe@...nel.dk, linux-btrace@...r.kernel.org,
	akpm@...ux-foundation.org, prasad@...ux.vnet.ibm.com
Subject: [RFC Patch 3/5] Blktrace - Remove the "block" directory operations from blktrace.c

This patch removes the code associated with the creation/removal/access
operations associated with the "block" directory. Please note that the  
"block"
di
rectory had been renamed "block_old" in the previous patch for testing.  
This
change is however temporary, since all code relevant to directory  
operations
are removed through this patch.

Signed-off-by: K.Prasad <prasad@...ux.vnet.ibm.com>
---
  block/blktrace.c             |   57  
-------------------------------------------
  include/linux/blktrace_api.h |    1
  2 files changed, 58 deletions(-)

Index: linux-blktrace-many/block/blktrace.c
===================================================================
--- linux-blktrace-many.orig/block/blktrace.c
+++ linux-blktrace-many/block/blktrace.c
@@ -180,59 +180,9 @@ void __blk_add_trace(struct blk_trace *b

  EXPORT_SYMBOL_GPL(__blk_add_trace);

-static struct dentry *blk_tree_root;
-static DEFINE_MUTEX(blk_tree_mutex);
-static unsigned int root_users;
-
-static inline void blk_remove_root(void)
-{
-	if (blk_tree_root) {
-		debugfs_remove(blk_tree_root);
-		blk_tree_root = NULL;
-	}
-}
-
-static void blk_remove_tree(struct dentry *dir)
-{
-	mutex_lock(&blk_tree_mutex);
-	debugfs_remove(dir);
-	if (--root_users == 0)
-		blk_remove_root();
-	mutex_unlock(&blk_tree_mutex);
-}
-
-static struct dentry *blk_create_tree(const char *blk_name)
-{
-	struct dentry *dir = NULL;
-	int created = 0;
-
-	mutex_lock(&blk_tree_mutex);
-
-	if (!blk_tree_root) {
-		blk_tree_root = debugfs_create_dir("block_old", NULL);
-		if (!blk_tree_root)
-			goto err;
-		created = 1;
-	}
-
-	dir = debugfs_create_dir(blk_name, blk_tree_root);
-	if (dir)
-		root_users++;
-	else {
-		/* Delete root only if we created it */
-		if (created)
-			blk_remove_root();
-	}
-
-err:
-	mutex_unlock(&blk_tree_mutex);
-	return dir;
-}
-
  static void blk_trace_cleanup(struct blk_trace *bt)
  {
  	relay_close(bt->rchan);
-	blk_remove_tree(bt->dir);
  	free_percpu(bt->sequence);
  	trace_cleanup(bt->tpk->ti);

@@ -339,11 +289,6 @@ int do_blk_trace_setup(struct request_qu
  		goto err;

  	ret = -ENOENT;
-	dir = blk_create_tree(buts->name);
-	if (!dir)
-		goto err;
-
-	bt->dir = dir;
  	bt->dev = dev;

  	ret = -EIO;
@@ -377,8 +322,6 @@ dir_err:
  parent_dir_err:
  	kfree(bt->tpk);
  err:
-	if (dir)
-		blk_remove_tree(dir);
  	if (bt) {
  		free_percpu(bt->sequence);
  		if (bt->rchan)
Index: linux-blktrace-many/include/linux/blktrace_api.h
===================================================================
--- linux-blktrace-many.orig/include/linux/blktrace_api.h
+++ linux-blktrace-many/include/linux/blktrace_api.h
@@ -125,7 +125,6 @@ struct blk_trace {
  	u64 end_lba;
  	u32 pid;
  	u32 dev;
-	struct dentry *dir;
  	struct trace_info *ti;
  	struct trace_printk_data *tpk;
  };
--
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