Skip to contentSkip to conversation

fscrypt: remove fscrypt_is_bounce_page() and fscrypt_pagecache_page()

PATCH Applied Tal Zussman 2 participants 4 messages Nov 1 – Nov 5 fscrypt: file system level encryption support

lore
Share & tools
lore
#0 lore raw

cover fscrypt: remove fscrypt_is_bounce_page() and fscrypt_pagecache_page()

Commit ef9024b5fca2 ("ceph: remove ceph_fscrypt_pagecache_page() and ceph_fscrypt_page_offset()") removed the last callers of these two helpers as part of ceph folio conversions. Remove them.

---
Tal Zussman (2):
fscrypt: remove fscrypt_pagecache_page()
fscrypt: remove fscrypt_is_bounce_page()

 include/linux/fscrypt.h | 21 ---------------------
 1 file changed, 21 deletions(-)

---
base-commit: 46fec1c3029b552ec63b2d01af9d43a386f043ea
change-id: 20261101-fscrypt-page-helpers-1b2abcb14657

Best regards,

Signature · 1 line
Tal Zussman <[email protected]>
#1 lore raw

PATCH 1/2 fscrypt: remove fscrypt_pagecache_page()

fscrypt_pagecache_page() no longer has any callers, so remove it. This removes a use of page_private().

---
 include/linux/fscrypt.h | 11 -----------
 1 file changed, 11 deletions(-)
include/linux/fscrypt.h +0 -11
index 28f2108e29f3..e70f630fab0c 100644
@@ -361,11 +361,6 @@ static inline bool fscrypt_is_bounce_page(struct page *page)
 	return page->mapping == NULL;
 }
 
-static inline struct page *fscrypt_pagecache_page(struct page *bounce_page)
-{
-	return (struct page *)page_private(bounce_page);
-}
-
 static inline bool fscrypt_is_bounce_folio(const struct folio *folio)
 {
 	return folio->mapping == NULL;
@@ -532,12 +527,6 @@ static inline bool fscrypt_is_bounce_page(struct page *page)
 	return false;
 }
 
-static inline struct page *fscrypt_pagecache_page(struct page *bounce_page)
-{
-	WARN_ON_ONCE(1);
-	return ERR_PTR(-EINVAL);
-}
-
 static inline bool fscrypt_is_bounce_folio(const struct folio *folio)
 {
 	return false;
Signature · 1 line
2.39.5
#2 lore raw

PATCH 2/2 fscrypt: remove fscrypt_is_bounce_page()

In reply to Tal Zussman

fscrypt_is_bounce_page() no longer has any callers, so remove it. This removes a use of page->mapping.

---
 include/linux/fscrypt.h | 10 ----------
 1 file changed, 10 deletions(-)
include/linux/fscrypt.h +0 -10
index e70f630fab0c..3a238bebbdf1 100644
@@ -356,11 +356,6 @@ int fscrypt_decrypt_block_inplace(const struct inode *inode, struct page *page,
 				  unsigned int len, unsigned int offs,
 				  u64 lblk_num);
 
-static inline bool fscrypt_is_bounce_page(struct page *page)
-{
-	return page->mapping == NULL;
-}
-
 static inline bool fscrypt_is_bounce_folio(const struct folio *folio)
 {
 	return folio->mapping == NULL;
@@ -522,11 +517,6 @@ static inline int fscrypt_decrypt_block_inplace(const struct inode *inode,
 	return -EOPNOTSUPP;
 }
 
-static inline bool fscrypt_is_bounce_page(struct page *page)
-{
-	return false;
-}
-
 static inline bool fscrypt_is_bounce_folio(const struct folio *folio)
 {
 	return false;
Signature · 1 line
2.39.5
maintainer Applied
#3 lore raw
In reply to Tal Zussman
Quoted 9 lines · Tal Zussman

Commit ef9024b5fca2 ("ceph: remove ceph_fscrypt_pagecache_page() and ceph_fscrypt_page_offset()") removed the last callers of these two helpers as part of ceph folio conversions. Remove them.

---
Tal Zussman (2):
fscrypt: remove fscrypt_pagecache_page()
fscrypt: remove fscrypt_is_bounce_page()

Quoted 5 lines
 include/linux/fscrypt.h | 21 ---------------------
 1 file changed, 21 deletions(-)

---
base-commit: 46fec1c3029b552ec63b2d01af9d43a386f043ea
change-id: 20261101-fscrypt-page-helpers-1b2abcb14657

Applied to https://git.kernel.org/pub/scm/fs/fscrypt/linux.git/log/?h=for-next

Thanks!

- Eric