Skip to content

Commit a9a95ec

Browse files
author
Eric Biggers
committed
fscrypt: Remove gfp_t argument from fscrypt_crypt_data_unit()
This argument is no longer used, so remove it. Link: https://lore.kernel.org/r/20250710060754.637098-5-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
1 parent 52e7e0d commit a9a95ec

3 files changed

Lines changed: 7 additions & 13 deletions

File tree

fs/crypto/bio.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk,
167167
do {
168168
err = fscrypt_crypt_data_unit(ci, FS_ENCRYPT, du_index,
169169
ZERO_PAGE(0), pages[i],
170-
du_size, offset,
171-
GFP_NOFS);
170+
du_size, offset);
172171
if (err)
173172
goto out;
174173
du_index++;

fs/crypto/crypto.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ void fscrypt_generate_iv(union fscrypt_iv *iv, u64 index,
110110
int fscrypt_crypt_data_unit(const struct fscrypt_inode_info *ci,
111111
fscrypt_direction_t rw, u64 index,
112112
struct page *src_page, struct page *dest_page,
113-
unsigned int len, unsigned int offs,
114-
gfp_t gfp_flags)
113+
unsigned int len, unsigned int offs)
115114
{
116115
struct crypto_sync_skcipher *tfm = ci->ci_enc_key.tfm;
117116
SYNC_SKCIPHER_REQUEST_ON_STACK(req, tfm);
@@ -197,7 +196,7 @@ struct page *fscrypt_encrypt_pagecache_blocks(struct folio *folio,
197196
for (i = offs; i < offs + len; i += du_size, index++) {
198197
err = fscrypt_crypt_data_unit(ci, FS_ENCRYPT, index,
199198
&folio->page, ciphertext_page,
200-
du_size, i, gfp_flags);
199+
du_size, i);
201200
if (err) {
202201
fscrypt_free_bounce_page(ciphertext_page);
203202
return ERR_PTR(err);
@@ -235,8 +234,7 @@ int fscrypt_encrypt_block_inplace(const struct inode *inode, struct page *page,
235234
if (WARN_ON_ONCE(inode->i_sb->s_cop->supports_subblock_data_units))
236235
return -EOPNOTSUPP;
237236
return fscrypt_crypt_data_unit(inode->i_crypt_info, FS_ENCRYPT,
238-
lblk_num, page, page, len, offs,
239-
gfp_flags);
237+
lblk_num, page, page, len, offs);
240238
}
241239
EXPORT_SYMBOL(fscrypt_encrypt_block_inplace);
242240

@@ -276,8 +274,7 @@ int fscrypt_decrypt_pagecache_blocks(struct folio *folio, size_t len,
276274
struct page *page = folio_page(folio, i >> PAGE_SHIFT);
277275

278276
err = fscrypt_crypt_data_unit(ci, FS_DECRYPT, index, page,
279-
page, du_size, i & ~PAGE_MASK,
280-
GFP_NOFS);
277+
page, du_size, i & ~PAGE_MASK);
281278
if (err)
282279
return err;
283280
}
@@ -310,8 +307,7 @@ int fscrypt_decrypt_block_inplace(const struct inode *inode, struct page *page,
310307
if (WARN_ON_ONCE(inode->i_sb->s_cop->supports_subblock_data_units))
311308
return -EOPNOTSUPP;
312309
return fscrypt_crypt_data_unit(inode->i_crypt_info, FS_DECRYPT,
313-
lblk_num, page, page, len, offs,
314-
GFP_NOFS);
310+
lblk_num, page, page, len, offs);
315311
}
316312
EXPORT_SYMBOL(fscrypt_decrypt_block_inplace);
317313

fs/crypto/fscrypt_private.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,7 @@ int fscrypt_initialize(struct super_block *sb);
337337
int fscrypt_crypt_data_unit(const struct fscrypt_inode_info *ci,
338338
fscrypt_direction_t rw, u64 index,
339339
struct page *src_page, struct page *dest_page,
340-
unsigned int len, unsigned int offs,
341-
gfp_t gfp_flags);
340+
unsigned int len, unsigned int offs);
342341
struct page *fscrypt_alloc_bounce_page(gfp_t gfp_flags);
343342

344343
void __printf(3, 4) __cold

0 commit comments

Comments
 (0)