Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eae68a75 authored by Barani Muthukumaran's avatar Barani Muthukumaran Committed by Gerrit - the friendly Code Review server
Browse files

f2fs: Skip force_buffered_io when ICE is enabled



When ICE is enabled, direct io does not have to be
buffered as the encryption happens inline in ICE
and without modifying the contents of the buffer.

Change-Id: I28177687589323ce16b8672c57108f2181bcde6f
Signed-off-by: default avatarBarani Muthukumaran <bmuthuku@codeaurora.org>
parent 11f6911c
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -3516,7 +3516,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);
	return (f2fs_encrypted_file(inode)
			&& !fscrypt_using_hardware_encryption(inode));
}

#define F2FS_FEATURE_FUNCS(name, flagname) \
@@ -3619,10 +3620,6 @@ static inline bool f2fs_force_buffered_io(struct inode *inode,
	struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
	int rw = iov_iter_rw(iter);

	if ((f2fs_encrypted_file(inode)) &&
		!fscrypt_using_hardware_encryption(inode))
		return true;

	if (f2fs_post_read_required(inode))
		return true;
	if (sbi->s_ndevs)