diff options
| author | Christoph Hellwig <hch@infradead.org> | 2005-01-14 23:38:01 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-14 23:38:01 -0800 |
| commit | 8b635618ac76aa0c47714918e631f5f8a36b6747 (patch) | |
| tree | ce7f3b256845c74713ae46a653a0cb4b3b9984d7 /include/linux | |
| parent | 887ff81a8bc6434ef43fe29d2643bf59376c30dc (diff) | |
[PATCH] ioctl rework #2
- add ->unlocked_ioctl method and a do_ioctl wrapper in ioctl.c so all
places calling ->ioctl get it. THis provides us a patch to migrate away
from holding bkl across ioctl implementations.
- add ->compat_ioctl method and call it in compat_sys_ioctl before doing
the hash lookup for registered handlers.
- streamline compat_sys_ioctl and move the complex error reporting into a
function of its own
From: "Michael S. Tsirkin" <mst@mellanox.co.il>
Handle generic ioctl commands by falling back on static conversion
functions in fs/compat_ioctl.c on -ENOIOCTLCMD code.
From: "Michael S. Tsirkin" <mst@mellanox.co.il>
With new unlocked_ioctl and ioctl_compat, ioctls can now be as fast as
read/write. So lets use fget_light/fput_light there, to get some speedup
in common case on SMP.
Signed-off-by: Michael s. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4d26f55c1299..945dbfabec83 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -907,8 +907,8 @@ typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, u /* * NOTE: - * read, write, poll, fsync, readv, writev can be called - * without the big kernel lock held in all filesystems. + * read, write, poll, fsync, readv, writev, unlocked_ioctl and compat_ioctl + * can be called without the big kernel lock held in all filesystems. */ struct file_operations { struct module *owner; @@ -920,6 +920,8 @@ struct file_operations { int (*readdir) (struct file *, void *, filldir_t); unsigned int (*poll) (struct file *, struct poll_table_struct *); int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); + long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); + long (*compat_ioctl) (struct file *, unsigned int, unsigned long); int (*mmap) (struct file *, struct vm_area_struct *); int (*open) (struct inode *, struct file *); int (*flush) (struct file *); |
