Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[pandora-kernel.git] / fs / ext4 / ioctl.c
index 2046d69..a567968 100644 (file)
@@ -174,29 +174,6 @@ setversion_out:
                mnt_drop_write(filp->f_path.mnt);
                return err;
        }
-#ifdef CONFIG_JBD2_DEBUG
-       case EXT4_IOC_WAIT_FOR_READONLY:
-               /*
-                * This is racy - by the time we're woken up and running,
-                * the superblock could be released.  And the module could
-                * have been unloaded.  So sue me.
-                *
-                * Returns 1 if it slept, else zero.
-                */
-               {
-                       DECLARE_WAITQUEUE(wait, current);
-                       int ret = 0;
-
-                       set_current_state(TASK_INTERRUPTIBLE);
-                       add_wait_queue(&EXT4_SB(sb)->ro_wait_queue, &wait);
-                       if (timer_pending(&EXT4_SB(sb)->turn_ro_timer)) {
-                               schedule();
-                               ret = 1;
-                       }
-                       remove_wait_queue(&EXT4_SB(sb)->ro_wait_queue, &wait);
-                       return ret;
-               }
-#endif
        case EXT4_IOC_GROUP_EXTEND: {
                ext4_fsblk_t n_blocks_count;
                int err, err2=0;
@@ -373,7 +350,7 @@ mext_out:
                        return -EOPNOTSUPP;
                }
 
-               if (copy_from_user(&range, (struct fstrim_range *)arg,
+               if (copy_from_user(&range, (struct fstrim_range __user *)arg,
                    sizeof(range)))
                        return -EFAULT;
 
@@ -383,7 +360,7 @@ mext_out:
                if (ret < 0)
                        return ret;
 
-               if (copy_to_user((struct fstrim_range *)arg, &range,
+               if (copy_to_user((struct fstrim_range __user *)arg, &range,
                    sizeof(range)))
                        return -EFAULT;
 
@@ -421,11 +398,6 @@ long ext4_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        case EXT4_IOC32_SETVERSION_OLD:
                cmd = EXT4_IOC_SETVERSION_OLD;
                break;
-#ifdef CONFIG_JBD2_DEBUG
-       case EXT4_IOC32_WAIT_FOR_READONLY:
-               cmd = EXT4_IOC_WAIT_FOR_READONLY;
-               break;
-#endif
        case EXT4_IOC32_GETRSVSZ:
                cmd = EXT4_IOC_GETRSVSZ;
                break;