Skip to contentSkip to conversation

ubifs: remove unnecessary #ifdef around fscrypt_ioctl_get_policy()

PATCH In review Eric Biggers 3 participants 4 messages Mar 15, 2019 – Apr 18, 2019

Subsystems (3)
lore
Share & tools
lore

Eric Biggers

author maintainer
#0 lore raw

PATCH 1/1 ubifs: remove unnecessary #ifdef around fscrypt_ioctl_get_policy()

From: Eric Biggers <[email protected]>

When !CONFIG_FS_ENCRYPTION, fscrypt_ioctl_get_policy() is already stubbed out to return -EOPNOTSUPP, so the extra #ifdef is not needed.

---
 fs/ubifs/ioctl.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
fs/ubifs/ioctl.c +1 -6
index 82e4e6a30b04..cd1d4212fc45 100644
@@ -205,13 +205,8 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		return -EOPNOTSUPP;
 #endif
 	}
-	case FS_IOC_GET_ENCRYPTION_POLICY: {
-#ifdef CONFIG_FS_ENCRYPTION
+	case FS_IOC_GET_ENCRYPTION_POLICY:
 		return fscrypt_ioctl_get_policy(file, (void __user *)arg);
-#else
-		return -EOPNOTSUPP;
-#endif
-	}
 
 	default:
 		return -ENOTTY;
Signature · 1 line
2.21.0.360.g471c308f928-goog
#1 lore raw
Quoted 20 lines · Eric Biggers

From: Eric Biggers <[email protected]>

When !CONFIG_FS_ENCRYPTION, fscrypt_ioctl_get_policy() is already stubbed out to return -EOPNOTSUPP, so the extra #ifdef is not needed.

---
 fs/ubifs/ioctl.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
fs/ubifs/ioctl.c +0 -1
index 82e4e6a30b04..cd1d4212fc45 100644
@@ -205,13 +205,8 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                return -EOPNOTSUPP;
 #endif
        }
-       case FS_IOC_GET_ENCRYPTION_POLICY: {

fs/ubifs/ioctl.c long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · line 212

Quoted 10 lines
fs/ubifs/ioctl.c +1 -5
-#ifdef CONFIG_FS_ENCRYPTION
+       case FS_IOC_GET_ENCRYPTION_POLICY:
                return fscrypt_ioctl_get_policy(file, (void __user *)arg);
-#else
-               return -EOPNOTSUPP;
-#endif
-       }
 
        default:
                return -ENOTTY;

Thanks for that one too. :-)

Signature · 2 lines
Thanks,
//richard
author maintainer
#2 lore raw
Quoted 29 lines · Richard Weinberger
Quoted 28 lines · Eric Biggers

From: Eric Biggers <[email protected]>

When !CONFIG_FS_ENCRYPTION, fscrypt_ioctl_get_policy() is already stubbed out to return -EOPNOTSUPP, so the extra #ifdef is not needed.

---
 fs/ubifs/ioctl.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
fs/ubifs/ioctl.c +1 -6
index 82e4e6a30b04..cd1d4212fc45 100644
@@ -205,13 +205,8 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                return -EOPNOTSUPP;
 #endif
        }
-       case FS_IOC_GET_ENCRYPTION_POLICY: {
-#ifdef CONFIG_FS_ENCRYPTION
+       case FS_IOC_GET_ENCRYPTION_POLICY:
                return fscrypt_ioctl_get_policy(file, (void __user *)arg);
-#else
-               return -EOPNOTSUPP;
-#endif
-       }
 
Quoted 8 lines

fs/ubifs/ioctl.c long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · line 212

Quoted 2 lines
fs/ubifs/ioctl.c +0 -0
        default:
                return -ENOTTY;

Thanks for that one too. :-)

Signature · 2 lines
Thanks,
//richard

Richard, can you take this through the ubifs tree for 5.2?

- Eric

#3 lore raw

Am Donnerstag, 18. April 2019, 21:29:53 CEST schrieb Eric Biggers:

Quoted 30 lines · Richard Weinberger
Quoted 29 lines · Eric Biggers
Quoted 28 lines

From: Eric Biggers <[email protected]>

When !CONFIG_FS_ENCRYPTION, fscrypt_ioctl_get_policy() is already stubbed out to return -EOPNOTSUPP, so the extra #ifdef is not needed.

---
 fs/ubifs/ioctl.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
fs/ubifs/ioctl.c +1 -6
index 82e4e6a30b04..cd1d4212fc45 100644
@@ -205,13 +205,8 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                return -EOPNOTSUPP;
 #endif
        }
-       case FS_IOC_GET_ENCRYPTION_POLICY: {
-#ifdef CONFIG_FS_ENCRYPTION
+       case FS_IOC_GET_ENCRYPTION_POLICY:
                return fscrypt_ioctl_get_policy(file, (void __user *)arg);
-#else
-               return -EOPNOTSUPP;
-#endif
-       }
 
Quoted 7 lines
Quoted 5 lines

fs/ubifs/ioctl.c long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · line 212

Quoted 2 lines
fs/ubifs/ioctl.c +0 -0
        default:
                return -ENOTTY;

Thanks for that one too. :-)

Richard, can you take this through the ubifs tree for 5.2?

Sure. Queued for 5.2. :-)

Thanks,
//richard