Loading Documentation/filesystems/Locking +1 −7 Original line number Diff line number Diff line Loading @@ -374,8 +374,6 @@ prototypes: ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 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 *); Loading Loading @@ -409,8 +407,7 @@ write: no aio_write: no readdir: no poll: no ioctl: yes (see below) unlocked_ioctl: no (see below) unlocked_ioctl: no compat_ioctl: no mmap: no open: no Loading Loading @@ -453,9 +450,6 @@ move ->readdir() to inode_operations and use a separate method for directory anything that resembles union-mount we won't have a struct file for all components. And there are other reasons why the current interface is a mess... ->ioctl() on regular files is superceded by the ->unlocked_ioctl() that doesn't take the BKL. ->read on directories probably must go away - we should just enforce -EISDIR in sys_read() and friends. Loading Documentation/filesystems/vfs.txt +1 −5 Original line number Diff line number Diff line Loading @@ -727,7 +727,6 @@ struct file_operations { ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 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 *); Loading Loading @@ -768,10 +767,7 @@ otherwise noted. activity on this file and (optionally) go to sleep until there is activity. Called by the select(2) and poll(2) system calls ioctl: called by the ioctl(2) system call unlocked_ioctl: called by the ioctl(2) system call. Filesystems that do not require the BKL should use this method instead of the ioctl() above. unlocked_ioctl: called by the ioctl(2) system call. compat_ioctl: called by the ioctl(2) system call when 32 bit system calls are used on 64 bit kernels. Loading drivers/media/video/v4l2-compat-ioctl32.c +1 −6 Original line number Diff line number Diff line Loading @@ -228,11 +228,6 @@ static long native_ioctl(struct file *file, unsigned int cmd, unsigned long arg) if (file->f_op->unlocked_ioctl) ret = file->f_op->unlocked_ioctl(file, cmd, arg); else if (file->f_op->ioctl) { lock_kernel(); ret = file->f_op->ioctl(file->f_path.dentry->d_inode, file, cmd, arg); unlock_kernel(); } return ret; } Loading Loading @@ -973,7 +968,7 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) { long ret = -ENOIOCTLCMD; if (!file->f_op->ioctl && !file->f_op->unlocked_ioctl) if (!file->f_op->unlocked_ioctl) return ret; switch (cmd) { Loading fs/bad_inode.c +0 −7 Original line number Diff line number Diff line Loading @@ -55,12 +55,6 @@ static unsigned int bad_file_poll(struct file *filp, poll_table *wait) return POLLERR; } static int bad_file_ioctl (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { return -EIO; } static long bad_file_unlocked_ioctl(struct file *file, unsigned cmd, unsigned long arg) { Loading Loading @@ -159,7 +153,6 @@ static const struct file_operations bad_file_ops = .aio_write = bad_file_aio_write, .readdir = bad_file_readdir, .poll = bad_file_poll, .ioctl = bad_file_ioctl, .unlocked_ioctl = bad_file_unlocked_ioctl, .compat_ioctl = bad_file_compat_ioctl, .mmap = bad_file_mmap, Loading fs/compat_ioctl.c +1 −2 Original line number Diff line number Diff line Loading @@ -1699,8 +1699,7 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, goto out_fput; } if (!filp->f_op || (!filp->f_op->ioctl && !filp->f_op->unlocked_ioctl)) if (!filp->f_op || !filp->f_op->unlocked_ioctl) goto do_ioctl; break; } Loading Loading
Documentation/filesystems/Locking +1 −7 Original line number Diff line number Diff line Loading @@ -374,8 +374,6 @@ prototypes: ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 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 *); Loading Loading @@ -409,8 +407,7 @@ write: no aio_write: no readdir: no poll: no ioctl: yes (see below) unlocked_ioctl: no (see below) unlocked_ioctl: no compat_ioctl: no mmap: no open: no Loading Loading @@ -453,9 +450,6 @@ move ->readdir() to inode_operations and use a separate method for directory anything that resembles union-mount we won't have a struct file for all components. And there are other reasons why the current interface is a mess... ->ioctl() on regular files is superceded by the ->unlocked_ioctl() that doesn't take the BKL. ->read on directories probably must go away - we should just enforce -EISDIR in sys_read() and friends. Loading
Documentation/filesystems/vfs.txt +1 −5 Original line number Diff line number Diff line Loading @@ -727,7 +727,6 @@ struct file_operations { ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 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 *); Loading Loading @@ -768,10 +767,7 @@ otherwise noted. activity on this file and (optionally) go to sleep until there is activity. Called by the select(2) and poll(2) system calls ioctl: called by the ioctl(2) system call unlocked_ioctl: called by the ioctl(2) system call. Filesystems that do not require the BKL should use this method instead of the ioctl() above. unlocked_ioctl: called by the ioctl(2) system call. compat_ioctl: called by the ioctl(2) system call when 32 bit system calls are used on 64 bit kernels. Loading
drivers/media/video/v4l2-compat-ioctl32.c +1 −6 Original line number Diff line number Diff line Loading @@ -228,11 +228,6 @@ static long native_ioctl(struct file *file, unsigned int cmd, unsigned long arg) if (file->f_op->unlocked_ioctl) ret = file->f_op->unlocked_ioctl(file, cmd, arg); else if (file->f_op->ioctl) { lock_kernel(); ret = file->f_op->ioctl(file->f_path.dentry->d_inode, file, cmd, arg); unlock_kernel(); } return ret; } Loading Loading @@ -973,7 +968,7 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) { long ret = -ENOIOCTLCMD; if (!file->f_op->ioctl && !file->f_op->unlocked_ioctl) if (!file->f_op->unlocked_ioctl) return ret; switch (cmd) { Loading
fs/bad_inode.c +0 −7 Original line number Diff line number Diff line Loading @@ -55,12 +55,6 @@ static unsigned int bad_file_poll(struct file *filp, poll_table *wait) return POLLERR; } static int bad_file_ioctl (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { return -EIO; } static long bad_file_unlocked_ioctl(struct file *file, unsigned cmd, unsigned long arg) { Loading Loading @@ -159,7 +153,6 @@ static const struct file_operations bad_file_ops = .aio_write = bad_file_aio_write, .readdir = bad_file_readdir, .poll = bad_file_poll, .ioctl = bad_file_ioctl, .unlocked_ioctl = bad_file_unlocked_ioctl, .compat_ioctl = bad_file_compat_ioctl, .mmap = bad_file_mmap, Loading
fs/compat_ioctl.c +1 −2 Original line number Diff line number Diff line Loading @@ -1699,8 +1699,7 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, goto out_fput; } if (!filp->f_op || (!filp->f_op->ioctl && !filp->f_op->unlocked_ioctl)) if (!filp->f_op || !filp->f_op->unlocked_ioctl) goto do_ioctl; break; } Loading