]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
fscrypt: don't special-case EOPNOTSUPP from fscrypt_get_encryption_info()
authorEric Biggers <ebiggers@google.com>
Mon, 30 Apr 2018 22:51:41 +0000 (15:51 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 20 May 2018 20:21:02 +0000 (16:21 -0400)
In fscrypt_setup_filename(), remove the unnecessary check for
fscrypt_get_encryption_info() returning EOPNOTSUPP.  There's no reason
to handle this error differently from any other.  I think there may have
been some confusion because the "notsupp" version of
fscrypt_get_encryption_info() returns EOPNOTSUPP -- but that's not
applicable from inside fs/crypto/.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/crypto/fname.c

index 3b5164b159cba2f9b48e7596f57fd258756de7d2..8088a606c0aa260f0df17ca59a29e82b4838bf10 100644 (file)
@@ -335,7 +335,7 @@ int fscrypt_setup_filename(struct inode *dir, const struct qstr *iname,
                return 0;
        }
        ret = fscrypt_get_encryption_info(dir);
-       if (ret && ret != -EOPNOTSUPP)
+       if (ret)
                return ret;
 
        if (dir->i_crypt_info) {