diff options
author | Theodore Ts'o <tytso@mit.edu> | 2016-12-12 21:50:28 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2016-12-12 21:50:28 -0500 |
commit | a551d7c8deefb6d9fb45a1de03a617dd064e0419 (patch) | |
tree | c58f83ef3edd83d55f8f574cfe7ba023e029090b /fs/f2fs/file.c | |
parent | 0cb80b4847553582830a59da2c022c37a1f4a119 (diff) | |
parent | 6a34e4d2be07255cc59e6ccaf820669cfd7f815c (diff) | |
download | op-kernel-dev-a551d7c8deefb6d9fb45a1de03a617dd064e0419.zip op-kernel-dev-a551d7c8deefb6d9fb45a1de03a617dd064e0419.tar.gz |
Merge branch 'fscrypt' into dev
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index c786507..f0c83f7 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1752,31 +1752,16 @@ static bool uuid_is_nonzero(__u8 u[16]) static int f2fs_ioc_set_encryption_policy(struct file *filp, unsigned long arg) { - struct fscrypt_policy policy; struct inode *inode = file_inode(filp); - if (copy_from_user(&policy, (struct fscrypt_policy __user *)arg, - sizeof(policy))) - return -EFAULT; - f2fs_update_time(F2FS_I_SB(inode), REQ_TIME); - return fscrypt_process_policy(filp, &policy); + return fscrypt_ioctl_set_policy(filp, (const void __user *)arg); } static int f2fs_ioc_get_encryption_policy(struct file *filp, unsigned long arg) { - struct fscrypt_policy policy; - struct inode *inode = file_inode(filp); - int err; - - err = fscrypt_get_policy(inode, &policy); - if (err) - return err; - - if (copy_to_user((struct fscrypt_policy __user *)arg, &policy, sizeof(policy))) - return -EFAULT; - return 0; + return fscrypt_ioctl_get_policy(filp, (void __user *)arg); } static int f2fs_ioc_get_encryption_pwsalt(struct file *filp, unsigned long arg) |