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

Commit 0ea43de2 authored by Andrey Markovytch's avatar Andrey Markovytch Committed by Gerrit - the friendly Code Review server
Browse files

ext4 crypto: added support for O_DIRECT flag



In case of HW FBE, O_DIRECT flag can be supported since FS is not
required for crypto operations

Change-Id: I2e6a7abb56f0e3efdf314a57db131837d029de2e
Signed-off-by: default avatarAndrey Markovytch <andreym@codeaurora.org>
parent 3162449f
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -3224,7 +3224,9 @@ static ssize_t ext4_ext_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
		get_block_func = ext4_get_block_write;
		dio_flags = DIO_LOCKING;
	}
#ifdef CONFIG_EXT4_FS_ENCRYPTION
#if defined(CONFIG_EXT4_FS_ENCRYPTION) && \
!defined(CONFIG_EXT4_FS_ICE_ENCRYPTION)

	BUG_ON(ext4_encrypted_inode(inode) && S_ISREG(inode->i_mode));
#endif
	if (IS_DAX(inode))
@@ -3291,7 +3293,9 @@ static ssize_t ext4_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
	size_t count = iov_iter_count(iter);
	ssize_t ret;

#ifdef CONFIG_EXT4_FS_ENCRYPTION
#if defined(CONFIG_EXT4_FS_ENCRYPTION) && \
!defined(CONFIG_EXT4_FS_ICE_ENCRYPTION)

	if (ext4_encrypted_inode(inode) && S_ISREG(inode->i_mode))
		return 0;
#endif