]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 20 Nov 2010 03:46:45 +0000 (19:46 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 20 Nov 2010 03:46:45 +0000 (19:46 -0800)
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: Add EXT4_IOC_TRIM ioctl to handle batched discard
  fs: Do not dispatch FITRIM through separate super_operation
  ext4: ext4_fill_super shouldn't return 0 on corruption
  jbd2: fix /proc/fs/jbd2/<dev> when using an external journal
  ext4: missing unlock in ext4_clear_request_list()
  ext4: fix setting random pages PageUptodate

1  2 
fs/ioctl.c

diff --combined fs/ioctl.c
index 4f46752ce4f9f7d02ce9afd7520117ba2ac01a23,f855ea4fc88895a13b53b075b9a3fb0dbcb53d8b..d6cc16476620760b6f01233f87fe5842335ba760
@@@ -6,6 -6,7 +6,6 @@@
  
  #include <linux/syscalls.h>
  #include <linux/mm.h>
 -#include <linux/smp_lock.h>
  #include <linux/capability.h>
  #include <linux/file.h>
  #include <linux/fs.h>
@@@ -529,41 -530,6 +529,6 @@@ static int ioctl_fsthaw(struct file *fi
        return thaw_super(sb);
  }
  
- static int ioctl_fstrim(struct file *filp, void __user *argp)
- {
-       struct super_block *sb = filp->f_path.dentry->d_inode->i_sb;
-       struct fstrim_range range;
-       int ret = 0;
-       if (!capable(CAP_SYS_ADMIN))
-               return -EPERM;
-       /* If filesystem doesn't support trim feature, return. */
-       if (sb->s_op->trim_fs == NULL)
-               return -EOPNOTSUPP;
-       /* If a blockdevice-backed filesystem isn't specified, return EINVAL. */
-       if (sb->s_bdev == NULL)
-               return -EINVAL;
-       if (argp == NULL) {
-               range.start = 0;
-               range.len = ULLONG_MAX;
-               range.minlen = 0;
-       } else if (copy_from_user(&range, argp, sizeof(range)))
-               return -EFAULT;
-       ret = sb->s_op->trim_fs(sb, &range);
-       if (ret < 0)
-               return ret;
-       if ((argp != NULL) &&
-           (copy_to_user(argp, &range, sizeof(range))))
-               return -EFAULT;
-       return 0;
- }
  /*
   * When you add any new common ioctls to the switches above and below
   * please update compat_sys_ioctl() too.
@@@ -614,10 -580,6 +579,6 @@@ int do_vfs_ioctl(struct file *filp, uns
                error = ioctl_fsthaw(filp);
                break;
  
-       case FITRIM:
-               error = ioctl_fstrim(filp, argp);
-               break;
        case FS_IOC_FIEMAP:
                return ioctl_fiemap(filp, arg);