public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	ak@suse.de, Arnd Bergmann <arnd@arndb.de>
Subject: [2.6 patch] compat: Remove leftovers from register_ioctl32_conversion
Date: Mon, 7 Nov 2005 22:04:23 +0100	[thread overview]
Message-ID: <20051107210423.GT3847@stusta.de> (raw)

We don't need the semaphore any more since we no longer
write to the ioctl32 hash table while the kernel is running.

This patch was already ACK'ed by Andi Kleen.


Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was sent by Arnd Bergmann on:
- 05 Nov 2005

 fs/compat.c             |    7 -------
 include/linux/ioctl32.h |    4 ----
 2 files changed, 11 deletions(-)

--- linux-2.6.14-rc.orig/fs/compat.c	2005-11-05 02:41:10.000000000 +0100
+++ linux-2.6.14-rc/fs/compat.c	2005-11-05 02:41:14.000000000 +0100
@@ -268,7 +268,6 @@
 
 #define IOCTL_HASHSIZE 256
 static struct ioctl_trans *ioctl32_hash_table[IOCTL_HASHSIZE];
-static DECLARE_RWSEM(ioctl32_sem);
 
 extern struct ioctl_trans ioctl_start[];
 extern int ioctl_table_size;
@@ -390,14 +389,10 @@
 		break;
 	}
 
-	/* When register_ioctl32_conversion is finally gone remove
-	   this lock! -AK */
-	down_read(&ioctl32_sem);
 	for (t = ioctl32_hash_table[ioctl32_hash(cmd)]; t; t = t->next) {
 		if (t->cmd == cmd)
 			goto found_handler;
 	}
-	up_read(&ioctl32_sem);
 
 	if (S_ISSOCK(filp->f_dentry->d_inode->i_mode) &&
 	    cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) {
@@ -417,11 +412,9 @@
 		lock_kernel();
 		error = t->handler(fd, cmd, arg, filp);
 		unlock_kernel();
-		up_read(&ioctl32_sem);
 		goto out_fput;
 	}
 
-	up_read(&ioctl32_sem);
  do_ioctl:
 	error = vfs_ioctl(filp, fd, cmd, arg);
  out_fput:
Index: linux-2.6.14-rc/include/linux/ioctl32.h
===================================================================
--- linux-2.6.14-rc.orig/include/linux/ioctl32.h	2005-11-05 02:41:10.000000000 +0100
+++ linux-2.6.14-rc/include/linux/ioctl32.h	2005-11-05 02:41:14.000000000 +0100
@@ -1,8 +1,6 @@
 #ifndef IOCTL32_H
 #define IOCTL32_H 1
 
-#include <linux/compiler.h>	/* for __deprecated */
-
 struct file;
 
 typedef int (*ioctl_trans_handler_t)(unsigned int, unsigned int,



                 reply	other threads:[~2005-11-07 21:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051107210423.GT3847@stusta.de \
    --to=bunk@stusta.de \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=arnd@arndb.de \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox