summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorChao Yu <chao@kernel.org>2023-12-10 10:20:39 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2023-12-11 22:34:55 +0100
commit4e4f1eb9949b10cb7d76370fd27d41f20ef2b32b (patch)
tree3ef90de35df1703081a902736bfb1714bad9de95 /fs/f2fs/f2fs.h
parentf2fs: update blkaddr in __set_data_blkaddr() for cleanup (diff)
downloadlinux-4e4f1eb9949b10cb7d76370fd27d41f20ef2b32b.tar.xz
linux-4e4f1eb9949b10cb7d76370fd27d41f20ef2b32b.zip
f2fs: introduce f2fs_invalidate_internal_cache() for cleanup
Just cleanup, no logic changes. Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r--fs/f2fs/f2fs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 50e666ebd987..65294e3b0bef 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -4613,6 +4613,13 @@ static inline bool f2fs_is_readonly(struct f2fs_sb_info *sbi)
return f2fs_sb_has_readonly(sbi) || f2fs_readonly(sbi->sb);
}
+static inline void f2fs_invalidate_internal_cache(struct f2fs_sb_info *sbi,
+ block_t blkaddr)
+{
+ invalidate_mapping_pages(META_MAPPING(sbi), blkaddr, blkaddr);
+ f2fs_invalidate_compress_page(sbi, blkaddr);
+}
+
#define EFSBADCRC EBADMSG /* Bad CRC detected */
#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */