]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fscrypt: Remove gfp_t argument from fscrypt_crypt_data_unit()
authorEric Biggers <ebiggers@kernel.org>
Thu, 10 Jul 2025 06:07:51 +0000 (23:07 -0700)
committerEric Biggers <ebiggers@kernel.org>
Thu, 10 Jul 2025 19:33:08 +0000 (12:33 -0700)
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>
fs/crypto/bio.c
fs/crypto/crypto.c
fs/crypto/fscrypt_private.h

index 13ad2dd771b64ff8629d9b2ce031475f78a89f19..486fcb2ecf13eb883d5ee867d791aa604008d879 100644 (file)
@@ -167,8 +167,7 @@ int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk,
                do {
                        err = fscrypt_crypt_data_unit(ci, FS_ENCRYPT, du_index,
                                                      ZERO_PAGE(0), pages[i],
-                                                     du_size, offset,
-                                                     GFP_NOFS);
+                                                     du_size, offset);
                        if (err)
                                goto out;
                        du_index++;
index 646b1831e683195c9ef4f364a4f88435ee97506c..bab0aacd4da36622e4742b08a7e2cd97c1675622 100644 (file)
@@ -110,8 +110,7 @@ void fscrypt_generate_iv(union fscrypt_iv *iv, u64 index,
 int fscrypt_crypt_data_unit(const struct fscrypt_inode_info *ci,
                            fscrypt_direction_t rw, u64 index,
                            struct page *src_page, struct page *dest_page,
-                           unsigned int len, unsigned int offs,
-                           gfp_t gfp_flags)
+                           unsigned int len, unsigned int offs)
 {
        struct crypto_sync_skcipher *tfm = ci->ci_enc_key.tfm;
        SYNC_SKCIPHER_REQUEST_ON_STACK(req, tfm);
@@ -197,7 +196,7 @@ struct page *fscrypt_encrypt_pagecache_blocks(struct folio *folio,
        for (i = offs; i < offs + len; i += du_size, index++) {
                err = fscrypt_crypt_data_unit(ci, FS_ENCRYPT, index,
                                              &folio->page, ciphertext_page,
-                                             du_size, i, gfp_flags);
+                                             du_size, i);
                if (err) {
                        fscrypt_free_bounce_page(ciphertext_page);
                        return ERR_PTR(err);
@@ -235,8 +234,7 @@ int fscrypt_encrypt_block_inplace(const struct inode *inode, struct page *page,
        if (WARN_ON_ONCE(inode->i_sb->s_cop->supports_subblock_data_units))
                return -EOPNOTSUPP;
        return fscrypt_crypt_data_unit(inode->i_crypt_info, FS_ENCRYPT,
-                                      lblk_num, page, page, len, offs,
-                                      gfp_flags);
+                                      lblk_num, page, page, len, offs);
 }
 EXPORT_SYMBOL(fscrypt_encrypt_block_inplace);
 
@@ -276,8 +274,7 @@ int fscrypt_decrypt_pagecache_blocks(struct folio *folio, size_t len,
                struct page *page = folio_page(folio, i >> PAGE_SHIFT);
 
                err = fscrypt_crypt_data_unit(ci, FS_DECRYPT, index, page,
-                                             page, du_size, i & ~PAGE_MASK,
-                                             GFP_NOFS);
+                                             page, du_size, i & ~PAGE_MASK);
                if (err)
                        return err;
        }
@@ -310,8 +307,7 @@ int fscrypt_decrypt_block_inplace(const struct inode *inode, struct page *page,
        if (WARN_ON_ONCE(inode->i_sb->s_cop->supports_subblock_data_units))
                return -EOPNOTSUPP;
        return fscrypt_crypt_data_unit(inode->i_crypt_info, FS_DECRYPT,
-                                      lblk_num, page, page, len, offs,
-                                      GFP_NOFS);
+                                      lblk_num, page, page, len, offs);
 }
 EXPORT_SYMBOL(fscrypt_decrypt_block_inplace);
 
index bffeb14501fd050a36fe5bd6813edd7cf9aa84bd..d8b485b9881c50b452ce58688370e5f0ce4f828d 100644 (file)
@@ -337,8 +337,7 @@ int fscrypt_initialize(struct super_block *sb);
 int fscrypt_crypt_data_unit(const struct fscrypt_inode_info *ci,
                            fscrypt_direction_t rw, u64 index,
                            struct page *src_page, struct page *dest_page,
-                           unsigned int len, unsigned int offs,
-                           gfp_t gfp_flags);
+                           unsigned int len, unsigned int offs);
 struct page *fscrypt_alloc_bounce_page(gfp_t gfp_flags);
 
 void __printf(3, 4) __cold