Now we have inline encrytion and fs layer encrption in the kernel, when we
choose inline encryption, we should not use bufferd IO instead of direct IO.

Signed-off-by: Lihong Kou <koulih...@huawei.com>
---
 fs/f2fs/f2fs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index cb700d797296..ccc5c9734f55 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3889,8 +3889,8 @@ static inline void f2fs_set_encrypted_inode(struct inode 
*inode)
  */
 static inline bool f2fs_post_read_required(struct inode *inode)
 {
-       return f2fs_encrypted_file(inode) || fsverity_active(inode) ||
-               f2fs_compressed_file(inode);
+       return (f2fs_encrypted_file(inode) && 
fscrypt_inode_uses_fs_layer_crypto(inode))
+               || fsverity_active(inode) || f2fs_compressed_file(inode);
 }
 
 /*
-- 
2.17.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to