lkml.org 
[lkml]   [2005]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 01/25] compat: Remove leftovers from register_ioctl32_conversion
    We don't need the semaphore any more since we no longer
    write to the ioctl32 hash table while the kernel is running.

    CC: ak@suse.de
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>

    Index: linux-2.6.14-rc/fs/compat.c
    ===================================================================
    --- 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,
    --

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

    \
     
     \ /
      Last update: 2005-11-05 17:36    [W:0.020 / U:0.412 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site