unsigned int len,
unsigned int offs,
gfp_t gfp_flags);
-extern int llcrypt_encrypt_block_inplace(const struct inode *inode,
- struct page *page, unsigned int len,
- unsigned int offs, u64 lblk_num,
- gfp_t gfp_flags);
+extern int llcrypt_encrypt_block(const struct inode *inode, struct page *src,
+ struct page *dst, unsigned int len,
+ unsigned int offs, u64 lblk_num, gfp_t gfp_flags);
extern int llcrypt_decrypt_pagecache_blocks(struct page *page, unsigned int len,
unsigned int offs);
-extern int llcrypt_decrypt_block_inplace(const struct inode *inode,
- struct page *page, unsigned int len,
- unsigned int offs, u64 lblk_num);
+
+extern int llcrypt_decrypt_block(const struct inode *inode, struct page *src,
+ struct page *dst, unsigned int len,
+ unsigned int offs, u64 lblk_num, gfp_t gfp_flags);
+
+static inline int llcrypt_decrypt_block_inplace(const struct inode *inode,
+ struct page *page,
+ unsigned int len,
+ unsigned int offs,
+ u64 lblk_num)
+{
+ return llcrypt_decrypt_block(inode, page, page, len, offs, lblk_num,
+ GFP_NOFS);
+}
static inline bool llcrypt_is_bounce_page(struct page *page)
{
return ERR_PTR(-EOPNOTSUPP);
}
-static inline int llcrypt_encrypt_block_inplace(const struct inode *inode,
- struct page *page,
- unsigned int len,
- unsigned int offs, u64 lblk_num,
- gfp_t gfp_flags)
+static inline int llcrypt_encrypt_block(const struct inode *inode,
+ struct page *src, struct page *dst,
+ unsigned int len, unsigned int offs,
+ u64 lblk_num, gfp_t gfp_flags)
{
return -EOPNOTSUPP;
}
return -EOPNOTSUPP;
}
+static inline int llcrypt_decrypt_block(const struct inode *inode,
+ struct page *src, struct page *dst,
+ unsigned int len, unsigned int offs,
+ u64 lblk_num, gfp_t gfp_flags)
+{
+ return -EOPNOTSUPP;
+}
+
static inline int llcrypt_decrypt_block_inplace(const struct inode *inode,
struct page *page,
unsigned int len,