diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-19 19:46:45 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-19 19:46:45 -0800 |
commit | b86db4744230c94e480de56f1b7f31117edbf193 (patch) | |
tree | e94240a428f525c11c8758ebdd50398cec95e7be /fs/ioctl.c | |
parent | 76db8ac45fc738f7d7664fe9b56d15c594a45228 (diff) | |
parent | e681c047e47c0abe67bf95857f23814372793cb0 (diff) | |
download | linux-exynos-b86db4744230c94e480de56f1b7f31117edbf193.tar.gz linux-exynos-b86db4744230c94e480de56f1b7f31117edbf193.tar.bz2 linux-exynos-b86db4744230c94e480de56f1b7f31117edbf193.zip |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* '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
Diffstat (limited to 'fs/ioctl.c')
-rw-r--r-- | fs/ioctl.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/fs/ioctl.c b/fs/ioctl.c index 4f46752ce4f9..d6cc16476620 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c @@ -529,41 +529,6 @@ static int ioctl_fsthaw(struct file *filp) 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 +579,6 @@ int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, error = ioctl_fsthaw(filp); break; - case FITRIM: - error = ioctl_fstrim(filp, argp); - break; - case FS_IOC_FIEMAP: return ioctl_fiemap(filp, arg); |