summaryrefslogtreecommitdiff
path: root/include/linux/fscrypt.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2026-07-12 22:37:04 -0400
committerEric Biggers <ebiggers@kernel.org>2026-07-20 10:39:26 -0700
commit35f440660fd53e2aa2e5be4aa5ccd87d388385ea (patch)
tree104183aaa63cdcdf100c108ea8d07767709ed71b /include/linux/fscrypt.h
parent170c3aa85d251ccd0f23a022a5efc5b3e105ac95 (diff)
downloadlinux-next-35f440660fd53e2aa2e5be4aa5ccd87d388385ea.tar.gz
linux-next-35f440660fd53e2aa2e5be4aa5ccd87d388385ea.zip
fscrypt: Remove fscrypt_dio_supported()
On block-based filesystems, fscrypt file contents encryption is now always implemented using blk-crypto. This implementation supports direct I/O. Therefore, fscrypt_dio_supported() now always returns true, except in the edge case where statx(STATX_DIOALIGN) is called on an encrypted regular file that hasn't had its key set up. But that was really a workaround rather than the desired behavior, so we can disregard it. Thus, fscrypt_dio_supported() is no longer needed. Remove it. Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20260713023708.9245-14-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'include/linux/fscrypt.h')
-rw-r--r--include/linux/fscrypt.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h
index f57aa9b4faca..96c7af05424c 100644
--- a/include/linux/fscrypt.h
+++ b/include/linux/fscrypt.h
@@ -872,8 +872,6 @@ void fscrypt_set_bio_crypt_ctx(struct bio *bio, const struct inode *inode,
bool fscrypt_mergeable_bio(struct bio *bio, const struct inode *inode,
loff_t pos);
-bool fscrypt_dio_supported(struct inode *inode);
-
u64 fscrypt_limit_io_blocks(const struct inode *inode, u64 lblk, u64 nr_blocks);
#else /* CONFIG_FS_ENCRYPTION_INLINE_CRYPT */
@@ -889,11 +887,6 @@ static inline bool fscrypt_mergeable_bio(struct bio *bio,
return true;
}
-static inline bool fscrypt_dio_supported(struct inode *inode)
-{
- return !fscrypt_needs_contents_encryption(inode);
-}
-
static inline u64 fscrypt_limit_io_blocks(const struct inode *inode, u64 lblk,
u64 nr_blocks)
{