The patch titled BLOCK: Move the ReiserFS device ioctl compat stuff to the ReiserFS driver has been removed from the -mm tree. Its filename is block-move-the-reiserfs-device-ioctl-compat-stuff-to-the-reiserfs-driver.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ Subject: BLOCK: Move the ReiserFS device ioctl compat stuff to the ReiserFS driver From: David Howells <dhowells@xxxxxxxxxx> Move the ReiserFS device ioctl compat stuff from fs/compat_ioctl.c to the ReiserFS driver so that the ReiserFS header file doesn't need to be included. Signed-off-by: David Howells <dhowells@xxxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/compat_ioctl.c | 12 ----------- fs/reiserfs/dir.c | 3 ++ fs/reiserfs/file.c | 4 +++ fs/reiserfs/ioctl.c | 35 ++++++++++++++++++++++++++++++++++ include/linux/reiserfs_fs.h | 9 ++++++++ 5 files changed, 51 insertions(+), 12 deletions(-) diff -puN fs/compat_ioctl.c~block-move-the-reiserfs-device-ioctl-compat-stuff-to-the-reiserfs-driver fs/compat_ioctl.c --- a/fs/compat_ioctl.c~block-move-the-reiserfs-device-ioctl-compat-stuff-to-the-reiserfs-driver +++ a/fs/compat_ioctl.c @@ -59,7 +59,6 @@ #include <linux/pci.h> #include <linux/module.h> #include <linux/serial.h> -#include <linux/reiserfs_fs.h> #include <linux/if_tun.h> #include <linux/ctype.h> #include <linux/ioctl32.h> @@ -2014,16 +2013,6 @@ static int vfat_ioctl32(unsigned fd, uns return ret; } -#define REISERFS_IOC_UNPACK32 _IOW(0xCD,1,int) - -static int reiserfs_ioctl32(unsigned fd, unsigned cmd, unsigned long ptr) -{ - if (cmd == REISERFS_IOC_UNPACK32) - cmd = REISERFS_IOC_UNPACK; - - return sys_ioctl(fd,cmd,ptr); -} - struct raw32_config_request { compat_int_t raw_minor; @@ -2784,7 +2773,6 @@ HANDLE_IOCTL(BLKGETSIZE64_32, do_blkgets /* vfat */ HANDLE_IOCTL(VFAT_IOCTL_READDIR_BOTH32, vfat_ioctl32) HANDLE_IOCTL(VFAT_IOCTL_READDIR_SHORT32, vfat_ioctl32) -HANDLE_IOCTL(REISERFS_IOC_UNPACK32, reiserfs_ioctl32) /* Raw devices */ HANDLE_IOCTL(RAW_SETBIND, raw_ioctl) HANDLE_IOCTL(RAW_GETBIND, raw_ioctl) diff -puN fs/reiserfs/dir.c~block-move-the-reiserfs-device-ioctl-compat-stuff-to-the-reiserfs-driver fs/reiserfs/dir.c --- a/fs/reiserfs/dir.c~block-move-the-reiserfs-device-ioctl-compat-stuff-to-the-reiserfs-driver +++ a/fs/reiserfs/dir.c @@ -22,6 +22,9 @@ const struct file_operations reiserfs_di .readdir = reiserfs_readdir, .fsync = reiserfs_dir_fsync, .ioctl = reiserfs_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = reiserfs_compat_ioctl, +#endif }; static int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, diff -puN fs/reiserfs/file.c~block-move-the-reiserfs-device-ioctl-compat-stuff-to-the-reiserfs-driver fs/reiserfs/file.c --- a/fs/reiserfs/file.c~block-move-the-reiserfs-device-ioctl-compat-stuff-to-the-reiserfs-driver +++ a/fs/reiserfs/file.c @@ -2,6 +2,7 @@ * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README */ +#include <linux/config.h> #include <linux/time.h> #include <linux/reiserfs_fs.h> #include <linux/reiserfs_acl.h> @@ -1568,6 +1569,9 @@ const struct file_operations reiserfs_fi .read = do_sync_read, .write = reiserfs_file_write, .ioctl = reiserfs_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = reiserfs_compat_ioctl, +#endif .mmap = generic_file_mmap, .open = generic_file_open, .release = reiserfs_file_release, diff -puN fs/reiserfs/ioctl.c~block-move-the-reiserfs-device-ioctl-compat-stuff-to-the-reiserfs-driver fs/reiserfs/ioctl.c --- a/fs/reiserfs/ioctl.c~block-move-the-reiserfs-device-ioctl-compat-stuff-to-the-reiserfs-driver +++ a/fs/reiserfs/ioctl.c @@ -9,6 +9,7 @@ #include <asm/uaccess.h> #include <linux/pagemap.h> #include <linux/smp_lock.h> +#include <linux/compat.h> static int reiserfs_unpack(struct inode *inode, struct file *filp); @@ -94,6 +95,40 @@ int reiserfs_ioctl(struct inode *inode, } } +#ifdef CONFIG_COMPAT +long reiserfs_compat_ioctl(struct file *file, unsigned int cmd, + unsigned long arg) +{ + struct inode *inode = file->f_dentry->d_inode; + int ret; + + /* These are just misnamed, they actually get/put from/to user an int */ + switch (cmd) { + case REISERFS_IOC32_UNPACK: + cmd = REISERFS_IOC_UNPACK; + break; + case REISERFS_IOC32_GETFLAGS: + cmd = REISERFS_IOC_GETFLAGS; + break; + case REISERFS_IOC32_SETFLAGS: + cmd = REISERFS_IOC_SETFLAGS; + break; + case REISERFS_IOC32_GETVERSION: + cmd = REISERFS_IOC_GETVERSION; + break; + case REISERFS_IOC32_SETVERSION: + cmd = REISERFS_IOC_SETVERSION; + break; + default: + return -ENOIOCTLCMD; + } + lock_kernel(); + ret = reiserfs_ioctl(inode, file, cmd, (unsigned long) compat_ptr(arg)); + unlock_kernel(); + return ret; +} +#endif + /* ** reiserfs_unpack ** Function try to convert tail from direct item into indirect. diff -puN include/linux/reiserfs_fs.h~block-move-the-reiserfs-device-ioctl-compat-stuff-to-the-reiserfs-driver include/linux/reiserfs_fs.h --- a/include/linux/reiserfs_fs.h~block-move-the-reiserfs-device-ioctl-compat-stuff-to-the-reiserfs-driver +++ a/include/linux/reiserfs_fs.h @@ -2171,6 +2171,8 @@ __u32 r5_hash(const signed char *msg, in /* prototypes from ioctl.c */ int reiserfs_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); +long reiserfs_compat_ioctl(struct file *filp, + unsigned int cmd, unsigned long arg); /* ioctl's command */ #define REISERFS_IOC_UNPACK _IOW(0xCD,1,long) @@ -2181,6 +2183,13 @@ int reiserfs_ioctl(struct inode *inode, #define REISERFS_IOC_GETVERSION FS_IOC_GETVERSION #define REISERFS_IOC_SETVERSION FS_IOC_SETVERSION +/* the 32 bit compat definitions with int argument */ +#define REISERFS_IOC32_UNPACK _IOW(0xCD, 1, int) +#define REISERFS_IOC32_GETFLAGS FS_IOC32_GETFLAGS +#define REISERFS_IOC32_SETFLAGS FS_IOC32_SETFLAGS +#define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION +#define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION + /* Locking primitives */ /* Right now we are still falling back to (un)lock_kernel, but eventually that would evolve into real per-fs locks */ _ Patches currently in -mm which might be from dhowells@xxxxxxxxxx are git-block.patch git-gfs2.patch git-nfs.patch nfs-replace-null-dentries-that-appear-in-readdirs-list-2.patch binfmt_elf-consistently-use-loff_t.patch afs-add-lock-annotations-to-afs_proc_cell_servers_startstop.patch elf_fdpic_core_dump-dont-take-tasklist_lock.patch simplify-update_times-avoid-jiffies-jiffies_64-aliasing-problem-2.patch lib-rwsemc-un-inline-rwsem_down_failed_common.patch nommu-check-that-access_process_vm-has-a-valid-target.patch nommu-set-bdi-capabilities-for-dev-mem-and-dev-kmem.patch nommu-set-bdi-capabilities-for-dev-mem-and-dev-kmem-tidy.patch reiserfs-make-sure-all-dentries-refs-are-released-before-calling-kill_block_super-try-2.patch fs-cache-provide-a-filesystem-specific-syncable-page-bit.patch fs-cache-generic-filesystem-caching-facility.patch fs-cache-release-page-private-in-failed-readahead.patch fs-cache-release-page-private-after-failed-readahead-12.patch fs-cache-make-kafs-use-fs-cache.patch fs-cache-make-kafs-use-fs-cache-fix.patch fs-cache-make-kafs-use-fs-cache-12.patch fs-cache-make-kafs-use-fs-cache-12-fix.patch fs-cache-make-kafs-use-fs-cache-vs-streamline-generic_file_-interfaces-and-filemap.patch nfs-use-local-caching.patch nfs-use-local-caching-12.patch nfs-use-local-caching-12-fix.patch fs-cache-cachefiles-ia64-missing-copy_page-export.patch fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem.patch fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-cachefiles-printk-format-warning.patch fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-warning-fixes.patch autofs-make-sure-all-dentries-refs-are-released-before-calling-kill_anon_super.patch vfs-destroy-the-dentries-contributed-by-a-superblock-on-unmounting.patch vfs-make-filldir_t-and-struct-kstat-deal-in-64-bit-inode-numbers.patch vfs-make-filldir_t-and-struct-kstat-deal-in-64-bit-inode-numbers-alpha-fix.patch nfs-represent-64-bit-fileids-as-64-bit-inode-numbers-on-32-bit-systems.patch ecryptfs-get_sb_dev-fix.patch block-move-extern-declarations-out-of-fs-c-into-header-files-tidy.patch block-make-it-possible-to-disable-the-block-layer-tidy.patch introduce-kernel_execve.patch rename-the-provided-execve-functions-to-kernel_execve.patch provide-kernel_execve-on-all-architectures.patch provide-kernel_execve-on-all-architectures-fix.patch remove-the-use-of-_syscallx-macros-in-uml.patch sh64-remove-the-use-of-kernel-syscalls.patch remove-remaining-errno-and-__kernel_syscalls__-references.patch reiser4-get_sb_dev-fix.patch mutex-subsystem-synchro-test-module.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html