summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/ioctl.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-03-26 08:52:31 +0100
committerRichard Weinberger <richard@nod.at>2019-05-07 21:58:31 +0200
commiteea2c05d927b031034e222110a4fc34914d97ca4 (patch)
treea5fc633c4d6795d332e247aa7bdc280c32df7388 /fs/ubifs/ioctl.c
parent9ca2d732644484488db31123ecd3bf122b551566 (diff)
downloadlinux-eea2c05d927b031034e222110a4fc34914d97ca4.tar.gz
linux-eea2c05d927b031034e222110a4fc34914d97ca4.tar.bz2
linux-eea2c05d927b031034e222110a4fc34914d97ca4.zip
ubifs: Remove #ifdef around CONFIG_FS_ENCRYPTION
ifdefs reduce readablity and compile coverage. This removes the ifdefs around CONFIG_FS_ENCRYPTION by using IS_ENABLED and relying on static inline wrappers. A new static inline wrapper for setting sb->s_cop is introduced to allow filesystems to unconditionally compile in their s_cop operations. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/ioctl.c')
-rw-r--r--fs/ubifs/ioctl.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/ubifs/ioctl.c b/fs/ubifs/ioctl.c
index cd1d4212fc45..6b05b3ec500e 100644
--- a/fs/ubifs/ioctl.c
+++ b/fs/ubifs/ioctl.c
@@ -193,7 +193,6 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return err;
}
case FS_IOC_SET_ENCRYPTION_POLICY: {
-#ifdef CONFIG_FS_ENCRYPTION
struct ubifs_info *c = inode->i_sb->s_fs_info;
err = ubifs_enable_encryption(c);
@@ -201,9 +200,6 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return err;
return fscrypt_ioctl_set_policy(file, (const void __user *)arg);
-#else
- return -EOPNOTSUPP;
-#endif
}
case FS_IOC_GET_ENCRYPTION_POLICY:
return fscrypt_ioctl_get_policy(file, (void __user *)arg);