aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-11-20 12:49:08 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-20 14:52:59 -0500
commit9e18fcdd346c6befdac360c047327fb058f33628 (patch)
tree12d9413d14ebb8febe14096bf75c37ed7fc0bf3c
parente6c667592e824c2871fe0ae3bc4b9bc7e81941f4 (diff)
[PATCH] Remove compat ioctl semaphore
Originally for 2.6.16, but the semaphore causes problems for some people so get rid of it now. It's not needed anymore because the ioctl hash table is never changed at run time now. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/compat.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/compat.c b/fs/compat.c
index 8e71cdbecc7c..0f7abf246d32 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -268,7 +268,6 @@ out:
268 268
269#define IOCTL_HASHSIZE 256 269#define IOCTL_HASHSIZE 256
270static struct ioctl_trans *ioctl32_hash_table[IOCTL_HASHSIZE]; 270static struct ioctl_trans *ioctl32_hash_table[IOCTL_HASHSIZE];
271static DECLARE_RWSEM(ioctl32_sem);
272 271
273extern struct ioctl_trans ioctl_start[]; 272extern struct ioctl_trans ioctl_start[];
274extern int ioctl_table_size; 273extern int ioctl_table_size;
@@ -390,14 +389,10 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
390 break; 389 break;
391 } 390 }
392 391
393 /* When register_ioctl32_conversion is finally gone remove
394 this lock! -AK */
395 down_read(&ioctl32_sem);
396 for (t = ioctl32_hash_table[ioctl32_hash(cmd)]; t; t = t->next) { 392 for (t = ioctl32_hash_table[ioctl32_hash(cmd)]; t; t = t->next) {
397 if (t->cmd == cmd) 393 if (t->cmd == cmd)
398 goto found_handler; 394 goto found_handler;
399 } 395 }
400 up_read(&ioctl32_sem);
401 396
402 if (S_ISSOCK(filp->f_dentry->d_inode->i_mode) && 397 if (S_ISSOCK(filp->f_dentry->d_inode->i_mode) &&
403 cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { 398 cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) {
@@ -417,11 +412,9 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
417 lock_kernel(); 412 lock_kernel();
418 error = t->handler(fd, cmd, arg, filp); 413 error = t->handler(fd, cmd, arg, filp);
419 unlock_kernel(); 414 unlock_kernel();
420 up_read(&ioctl32_sem);
421 goto out_fput; 415 goto out_fput;
422 } 416 }
423 417
424 up_read(&ioctl32_sem);
425 do_ioctl: 418 do_ioctl:
426 error = vfs_ioctl(filp, fd, cmd, arg); 419 error = vfs_ioctl(filp, fd, cmd, arg);
427 out_fput: 420 out_fput: