Skip to content

Commit fa65058

Browse files
author
Eric Biggers
committed
ceph: Remove gfp_t argument from ceph_fscrypt_encrypt_*()
This argument is no longer used, so remove it. Reviewed-by: Alex Markuze <amarkuze@redhat.com> Link: https://lore.kernel.org/r/20250710060754.637098-7-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
1 parent 4746258 commit fa65058

4 files changed

Lines changed: 10 additions & 16 deletions

File tree

fs/ceph/crypto.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,7 @@ int ceph_fscrypt_decrypt_block_inplace(const struct inode *inode,
516516

517517
int ceph_fscrypt_encrypt_block_inplace(const struct inode *inode,
518518
struct page *page, unsigned int len,
519-
unsigned int offs, u64 lblk_num,
520-
gfp_t gfp_flags)
519+
unsigned int offs, u64 lblk_num)
521520
{
522521
struct ceph_client *cl = ceph_inode_to_client(inode);
523522

@@ -641,17 +640,16 @@ int ceph_fscrypt_decrypt_extents(struct inode *inode, struct page **page,
641640
* @page: pointer to page array
642641
* @off: offset into the file that the data starts
643642
* @len: max length to encrypt
644-
* @gfp: gfp flags to use for allocation
645643
*
646-
* Decrypt an array of cleartext pages and return the amount of
644+
* Encrypt an array of cleartext pages and return the amount of
647645
* data encrypted. Any data in the page prior to the start of the
648646
* first complete block in the read is ignored. Any incomplete
649647
* crypto blocks at the end of the array are ignored.
650648
*
651649
* Returns the length of the encrypted data or a negative errno.
652650
*/
653651
int ceph_fscrypt_encrypt_pages(struct inode *inode, struct page **page, u64 off,
654-
int len, gfp_t gfp)
652+
int len)
655653
{
656654
int i, num_blocks;
657655
u64 baseblk = off >> CEPH_FSCRYPT_BLOCK_SHIFT;
@@ -672,7 +670,7 @@ int ceph_fscrypt_encrypt_pages(struct inode *inode, struct page **page, u64 off,
672670

673671
fret = ceph_fscrypt_encrypt_block_inplace(inode, page[pgidx],
674672
CEPH_FSCRYPT_BLOCK_SIZE, pgoffs,
675-
baseblk + i, gfp);
673+
baseblk + i);
676674
if (fret < 0) {
677675
if (ret == 0)
678676
ret = fret;

fs/ceph/crypto.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,14 @@ int ceph_fscrypt_decrypt_block_inplace(const struct inode *inode,
155155
unsigned int offs, u64 lblk_num);
156156
int ceph_fscrypt_encrypt_block_inplace(const struct inode *inode,
157157
struct page *page, unsigned int len,
158-
unsigned int offs, u64 lblk_num,
159-
gfp_t gfp_flags);
158+
unsigned int offs, u64 lblk_num);
160159
int ceph_fscrypt_decrypt_pages(struct inode *inode, struct page **page,
161160
u64 off, int len);
162161
int ceph_fscrypt_decrypt_extents(struct inode *inode, struct page **page,
163162
u64 off, struct ceph_sparse_extent *map,
164163
u32 ext_cnt);
165164
int ceph_fscrypt_encrypt_pages(struct inode *inode, struct page **page, u64 off,
166-
int len, gfp_t gfp);
165+
int len);
167166

168167
static inline struct page *ceph_fscrypt_pagecache_page(struct page *page)
169168
{
@@ -246,8 +245,7 @@ static inline int ceph_fscrypt_decrypt_block_inplace(const struct inode *inode,
246245

247246
static inline int ceph_fscrypt_encrypt_block_inplace(const struct inode *inode,
248247
struct page *page, unsigned int len,
249-
unsigned int offs, u64 lblk_num,
250-
gfp_t gfp_flags)
248+
unsigned int offs, u64 lblk_num)
251249
{
252250
return 0;
253251
}
@@ -269,7 +267,7 @@ static inline int ceph_fscrypt_decrypt_extents(struct inode *inode,
269267

270268
static inline int ceph_fscrypt_encrypt_pages(struct inode *inode,
271269
struct page **page, u64 off,
272-
int len, gfp_t gfp)
270+
int len)
273271
{
274272
return 0;
275273
}

fs/ceph/file.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,8 +1992,7 @@ ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos,
19921992

19931993
if (IS_ENCRYPTED(inode)) {
19941994
ret = ceph_fscrypt_encrypt_pages(inode, pages,
1995-
write_pos, write_len,
1996-
GFP_KERNEL);
1995+
write_pos, write_len);
19971996
if (ret < 0) {
19981997
doutc(cl, "encryption failed with %d\n", ret);
19991998
ceph_release_page_vector(pages, num_pages);

fs/ceph/inode.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2436,8 +2436,7 @@ static int fill_fscrypt_truncate(struct inode *inode,
24362436
/* encrypt the last block */
24372437
ret = ceph_fscrypt_encrypt_block_inplace(inode, page,
24382438
CEPH_FSCRYPT_BLOCK_SIZE,
2439-
0, block,
2440-
GFP_KERNEL);
2439+
0, block);
24412440
if (ret)
24422441
goto out;
24432442
}

0 commit comments

Comments
 (0)