projects/linux·commit 585e5b17

Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt

585e5b17 · Linus Torvalds <[email protected]> · 2020-11-12 16:39:58 -08:00

Pull fscrypt fix from Eric Biggers:
 "Fix a regression where new files weren't using inline encryption when
  they should be"

* tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt:
  fscrypt: fix inline encryption not used on new files
Commit
585e5b17b92dead8a3aca4e3c9876fbca5f7e0ba
Parents
20ca21df · d19d8d34

Merge commit. Changes below are compared with the first parent: 20ca21df.

Changes

1 files changed · +1 −1

FileStatusAddDelContent
fs/crypto/inline_crypt.cmodified+1−1View file

fs/crypto/inline_crypt.c

View file
diff --git a/fs/crypto/inline_crypt.c b/fs/crypto/inline_crypt.c
index 89bffa8..c57bebf 100644
--- a/fs/crypto/inline_crypt.c
+++ b/fs/crypto/inline_crypt.c
@@ -74,7 +74,7 @@ int fscrypt_select_encryption_impl(struct fscrypt_info *ci)
int i;
/* The file must need contents encryption, not filenames encryption */
- if (!fscrypt_needs_contents_encryption(inode))
+ if (!S_ISREG(inode->i_mode))
return 0;
/* The crypto mode must have a blk-crypto counterpart */