diff options
author | Richard Weinberger <richard@nod.at> | 2016-10-20 00:24:47 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2016-12-13 01:07:38 +0300 |
commit | e021986ee4119e487febb9a5f077ec77dff85865 (patch) | |
tree | afce15fde0bd515e82f2463c74fffbe63f54dd5d /fs/ubifs/ioctl.c | |
parent | d63d61c16972c667d770f713c21aa04e2c0489d2 (diff) | |
download | linux-e021986ee4119e487febb9a5f077ec77dff85865.tar.xz |
ubifs: Implement UBIFS_FLG_ENCRYPTION
This feature flag indicates that the filesystem contains encrypted
files.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/ioctl.c')
-rw-r--r-- | fs/ubifs/ioctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ubifs/ioctl.c b/fs/ubifs/ioctl.c index 6bb5b35050de..3d10f5525274 100644 --- a/fs/ubifs/ioctl.c +++ b/fs/ubifs/ioctl.c @@ -183,6 +183,7 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) } case FS_IOC_SET_ENCRYPTION_POLICY: { #ifdef CONFIG_UBIFS_FS_ENCRYPTION + struct ubifs_info *c = inode->i_sb->s_fs_info; struct fscrypt_policy policy; if (copy_from_user(&policy, @@ -190,6 +191,10 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) sizeof(policy))) return -EFAULT; + err = ubifs_enable_encryption(c); + if (err) + return err; + err = fscrypt_process_policy(file, &policy); return err; |