diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-11-30 09:26:29 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-12-12 14:53:56 -0800 |
commit | e7547daccd6a37522f0af74ec4b5a3036f3dd328 (patch) | |
tree | 1d680fd4c9091b6b015425d85df8d66ef73a4e6a /fs/f2fs/inode.c | |
parent | 749d543c0d451fff31e8f7a3e0a031ffcbf1ebb1 (diff) |
f2fs: refactor extent_cache to support for read and more
This patch prepares extent_cache to be ready for addition.
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r-- | fs/f2fs/inode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 2c705c60019b..086f201f15a0 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -262,8 +262,8 @@ static bool sanity_check_inode(struct inode *inode, struct page *node_page) return false; } - if (fi->extent_tree) { - struct extent_info *ei = &fi->extent_tree->largest; + if (fi->extent_tree[EX_READ]) { + struct extent_info *ei = &fi->extent_tree[EX_READ]->largest; if (ei->len && (!f2fs_is_valid_blkaddr(sbi, ei->blk, @@ -607,7 +607,7 @@ retry: void f2fs_update_inode(struct inode *inode, struct page *node_page) { struct f2fs_inode *ri; - struct extent_tree *et = F2FS_I(inode)->extent_tree; + struct extent_tree *et = F2FS_I(inode)->extent_tree[EX_READ]; f2fs_wait_on_page_writeback(node_page, NODE, true, true); set_page_dirty(node_page); |