diff options
| author | Eric Biggers <ebiggers@kernel.org> | 2026-07-12 22:37:06 -0400 |
|---|---|---|
| committer | Eric Biggers <ebiggers@kernel.org> | 2026-07-20 10:39:26 -0700 |
| commit | a43ea998fa57eb31cc4b25c9b8b96ed107898f19 (patch) | |
| tree | 17e6822da60d1cefebbf0cdfc0ba22dd0ae79d2c /include/linux/fscrypt.h | |
| parent | 8c2c9c4063d1cf8ed00ba32ab3677725559f8334 (diff) | |
| download | linux-next-a43ea998fa57eb31cc4b25c9b8b96ed107898f19.tar.gz linux-next-a43ea998fa57eb31cc4b25c9b8b96ed107898f19.zip | |
fscrypt: Remove unused functions and workqueue
Remove functions that are no longer used:
- fscrypt_decrypt_bio()
- fscrypt_decrypt_pagecache_blocks()
- fscrypt_inode_uses_fs_layer_crypto()
- fscrypt_inode_uses_inline_crypto()
- fscrypt_enqueue_decrypt_work()
This makes the decryption workqueue unused, so remove it too.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260713023708.9245-16-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'include/linux/fscrypt.h')
| -rw-r--r-- | include/linux/fscrypt.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h index 96c7af05424c..03c0f50bb6f6 100644 --- a/include/linux/fscrypt.h +++ b/include/linux/fscrypt.h @@ -345,7 +345,6 @@ static inline void fscrypt_prepare_dentry(struct dentry *dentry, } /* crypto.c */ -void fscrypt_enqueue_decrypt_work(struct work_struct *); struct page *fscrypt_encrypt_pagecache_blocks(struct folio *folio, size_t len, size_t offs, gfp_t gfp_flags); @@ -353,8 +352,6 @@ int fscrypt_encrypt_block_inplace(const struct inode *inode, struct page *page, unsigned int len, unsigned int offs, u64 lblk_num); -int fscrypt_decrypt_pagecache_blocks(struct folio *folio, size_t len, - size_t offs); int fscrypt_decrypt_block_inplace(const struct inode *inode, struct page *page, unsigned int len, unsigned int offs, u64 lblk_num); @@ -452,7 +449,6 @@ bool fscrypt_match_name(const struct fscrypt_name *fname, u64 fscrypt_fname_siphash(const struct inode *dir, const struct qstr *name); /* bio.c */ -bool fscrypt_decrypt_bio(struct bio *bio); int fscrypt_zeroout_range(const struct inode *inode, loff_t pos, sector_t sector, u64 len); @@ -512,9 +508,6 @@ static inline void fscrypt_prepare_dentry(struct dentry *dentry, } /* crypto.c */ -static inline void fscrypt_enqueue_decrypt_work(struct work_struct *work) -{ -} static inline struct page *fscrypt_encrypt_pagecache_blocks(struct folio *folio, size_t len, size_t offs, gfp_t gfp_flags) @@ -530,12 +523,6 @@ static inline int fscrypt_encrypt_block_inplace(const struct inode *inode, return -EOPNOTSUPP; } -static inline int fscrypt_decrypt_pagecache_blocks(struct folio *folio, - size_t len, size_t offs) -{ - return -EOPNOTSUPP; -} - static inline int fscrypt_decrypt_block_inplace(const struct inode *inode, struct page *page, unsigned int len, @@ -753,10 +740,6 @@ static inline int fscrypt_d_revalidate(struct inode *dir, const struct qstr *nam } /* bio.c */ -static inline bool fscrypt_decrypt_bio(struct bio *bio) -{ - return true; -} static inline int fscrypt_zeroout_range(const struct inode *inode, loff_t pos, sector_t sector, u64 len) @@ -895,36 +878,6 @@ static inline u64 fscrypt_limit_io_blocks(const struct inode *inode, u64 lblk, #endif /* !CONFIG_FS_ENCRYPTION_INLINE_CRYPT */ /** - * fscrypt_inode_uses_inline_crypto() - test whether an inode uses inline - * encryption - * @inode: an inode. If encrypted, its key must be set up. - * - * Return: true if the inode requires file contents encryption and if the - * encryption should be done in the block layer via blk-crypto rather - * than in the filesystem layer. - */ -static inline bool fscrypt_inode_uses_inline_crypto(const struct inode *inode) -{ - return fscrypt_needs_contents_encryption(inode) && - inode->i_sb->s_cop->is_block_based; -} - -/** - * fscrypt_inode_uses_fs_layer_crypto() - test whether an inode uses fs-layer - * encryption - * @inode: an inode. If encrypted, its key must be set up. - * - * Return: true if the inode requires file contents encryption and if the - * encryption should be done in the filesystem layer rather than in the - * block layer via blk-crypto. - */ -static inline bool fscrypt_inode_uses_fs_layer_crypto(const struct inode *inode) -{ - return fscrypt_needs_contents_encryption(inode) && - !inode->i_sb->s_cop->is_block_based; -} - -/** * fscrypt_has_encryption_key() - check whether an inode has had its key set up * @inode: the inode to check * |
