File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,14 +47,15 @@ void f2fs_destroy_bioset(void)
4747 bioset_exit (& f2fs_bioset );
4848}
4949
50- bool f2fs_is_cp_guaranteed (struct page * page )
50+ bool f2fs_is_cp_guaranteed (const struct page * page )
5151{
52- struct address_space * mapping = page_folio (page )-> mapping ;
52+ const struct folio * folio = page_folio (page );
53+ struct address_space * mapping = folio -> mapping ;
5354 struct inode * inode ;
5455 struct f2fs_sb_info * sbi ;
5556
56- if (fscrypt_is_bounce_page ( page ))
57- return page_private_gcing ( fscrypt_pagecache_page ( page ));
57+ if (fscrypt_is_bounce_folio ( folio ))
58+ return folio_test_f2fs_gcing ( fscrypt_pagecache_folio ( folio ));
5859
5960 inode = mapping -> host ;
6061 sbi = F2FS_I_SB (inode );
@@ -65,7 +66,7 @@ bool f2fs_is_cp_guaranteed(struct page *page)
6566 return true;
6667
6768 if ((S_ISREG (inode -> i_mode ) && IS_NOQUOTA (inode )) ||
68- page_private_gcing ( page ))
69+ folio_test_f2fs_gcing ( folio ))
6970 return true;
7071 return false;
7172}
Original file line number Diff line number Diff line change @@ -3990,7 +3990,7 @@ void f2fs_init_ckpt_req_control(struct f2fs_sb_info *sbi);
39903990 */
39913991int __init f2fs_init_bioset (void );
39923992void f2fs_destroy_bioset (void );
3993- bool f2fs_is_cp_guaranteed (struct page * page );
3993+ bool f2fs_is_cp_guaranteed (const struct page * page );
39943994int f2fs_init_bio_entry_cache (void );
39953995void f2fs_destroy_bio_entry_cache (void );
39963996void f2fs_submit_read_bio (struct f2fs_sb_info * sbi , struct bio * bio ,
Original file line number Diff line number Diff line change @@ -332,12 +332,13 @@ static inline struct page *fscrypt_pagecache_page(struct page *bounce_page)
332332 return (struct page * )page_private (bounce_page );
333333}
334334
335- static inline bool fscrypt_is_bounce_folio (struct folio * folio )
335+ static inline bool fscrypt_is_bounce_folio (const struct folio * folio )
336336{
337337 return folio -> mapping == NULL ;
338338}
339339
340- static inline struct folio * fscrypt_pagecache_folio (struct folio * bounce_folio )
340+ static inline
341+ struct folio * fscrypt_pagecache_folio (const struct folio * bounce_folio )
341342{
342343 return bounce_folio -> private ;
343344}
@@ -518,12 +519,13 @@ static inline struct page *fscrypt_pagecache_page(struct page *bounce_page)
518519 return ERR_PTR (- EINVAL );
519520}
520521
521- static inline bool fscrypt_is_bounce_folio (struct folio * folio )
522+ static inline bool fscrypt_is_bounce_folio (const struct folio * folio )
522523{
523524 return false;
524525}
525526
526- static inline struct folio * fscrypt_pagecache_folio (struct folio * bounce_folio )
527+ static inline
528+ struct folio * fscrypt_pagecache_folio (const struct folio * bounce_folio )
527529{
528530 WARN_ON_ONCE (1 );
529531 return ERR_PTR (- EINVAL );
You can’t perform that action at this time.
0 commit comments