Commit 84ca9df8 authored by Jingbo Xu's avatar Jingbo Xu Committed by Baokun Li
Browse files

erofs: remove unused device mapping in meta routine

mainline inclusion
from mainline-v6.3-rc1
commit bdfa9014
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IB5UKT



--------------------------------

Currently metadata is always on bootstrap, and thus device mapping is
not needed so far.  Remove the redundant device mapping in the meta
routine.

Signed-off-by: default avatarJingbo Xu <jefflexu@linux.alibaba.com>
Reviewed-by: default avatarJia Zhu <zhujia.zj@bytedance.com>
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Link: https://lore.kernel.org/r/20230209063913.46341-2-jefflexu@linux.alibaba.com


Signed-off-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>

Conflicts:
	fs/erofs/fscache.c
[ Because it hasn't been switched to folio yet. ]
Signed-off-by: default avatarBaokun Li <libaokun1@huawei.com>
parent ca1b3ab2
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -57,16 +57,9 @@ static int erofs_fscache_meta_readpage(struct file *data, struct page *page)
{
	int ret;
	struct super_block *sb = page->mapping->host->i_sb;
	struct erofs_map_dev mdev = {
		.m_deviceid = 0,
		.m_pa = page_offset(page),
	};

	ret = erofs_map_dev(sb, &mdev);
	if (ret)
		goto out;
	struct erofs_fscache *ctx = page->mapping->host->i_private;

	ret = fscache_read_or_alloc_page(mdev.m_fscache->cookie, page,
	ret = fscache_read_or_alloc_page(ctx->cookie, page,
					 erofs_readpage_from_fscache_complete,
					 NULL,
					 GFP_KERNEL);
@@ -423,6 +416,7 @@ struct erofs_fscache *erofs_fscache_acquire_cookie(struct super_block *sb,
		inode->i_size = OFFSET_MAX;
		inode->i_mapping->a_ops = &erofs_fscache_meta_aops;
		mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS);
		inode->i_private = ctx;

		ctx->inode = inode;
	}