This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / fs / ioctl.c
index 12f3e71..c4d38f6 100644 (file)
@@ -4,11 +4,13 @@
  *  Copyright (C) 1991, 1992  Linus Torvalds
  */
 
+#include <linux/config.h>
 #include <linux/mm.h>
 #include <linux/smp_lock.h>
 #include <linux/file.h>
 #include <linux/fs.h>
 #include <linux/security.h>
+#include <linux/module.h>
 #include <linux/proc_fs.h>
 #include <linux/vserver/inode.h>
 #include <linux/vserver/xid.h>
@@ -16,7 +18,7 @@
 #include <asm/uaccess.h>
 #include <asm/ioctls.h>
 
-#ifdef CONFIG_VSERVER_LEGACY           
+#ifdef CONFIG_VSERVER_LEGACY
 extern int vx_proc_ioctl(struct inode *, struct file *,
        unsigned int, unsigned long);
 #endif
@@ -128,7 +130,7 @@ asmlinkage long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
                        else
                                error = -ENOTTY;
                        break;
-#ifdef CONFIG_VSERVER_LEGACY           
+#ifdef CONFIG_VSERVER_LEGACY
 #ifndef CONFIG_INOXID_NONE
                case FIOC_GETXID: {
                        struct inode *inode = filp->f_dentry->d_inode;
@@ -160,7 +162,7 @@ asmlinkage long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
                        inode->i_xid = (xid & 0xFFFF);
                        inode->i_ctime = CURRENT_TIME;
                        mark_inode_dirty(inode);
-                       break;  
+                       break;
                }
 #endif
                case FIOC_GETXFLG:
@@ -183,3 +185,11 @@ asmlinkage long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
 out:
        return error;
 }
+
+/*
+ * Platforms implementing 32 bit compatibility ioctl handlers in
+ * modules need this exported
+ */
+#ifdef CONFIG_COMPAT
+EXPORT_SYMBOL(sys_ioctl);
+#endif