Skip to contentSkip to conversation

staging: erofs: fix `trace_erofs_readpage' position

PATCH New Gao Xiang 1 participant 2 messages Nov 5, 2018 Staging

lore
Share & tools
lore

Gao Xiang

author
#0 lore raw

PATCH 1/10 staging: erofs: fix `trace_erofs_readpage' position

trace_erofs_readpage' should be placed in .readpage() rather than in the internal z_erofs_do_read_page'.

Fixes 284db12cfda3 ("staging: erofs: add trace points for reading zipped data")
Cc Chen Gong <gongchen4 at huawei.com>
Signed-off-by Gao Xiang <gaoxiang25 at huawei.com>
---
 drivers/staging/erofs/unzip_vle.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/erofs/unzip_vle.c +2 -2
index 79d3ba62b298..94ceb391f607 100644
@@ -597,8 +597,6 @@ static int z_erofs_do_read_page(struct z_erofs_vle_frontend *fe,
 	unsigned int cur, end, spiltted, index;
 	int err = 0;
 
-	trace_erofs_readpage(page, false);
-
 	/* register locked file pages as online pages in pack */
 	z_erofs_onlinepage_init(page);
 
@@ -1287,6 +1285,8 @@ static int z_erofs_vle_normalaccess_readpage(struct file *file,
 	int err;
 	LIST_HEAD(pagepool);
 
+	trace_erofs_readpage(page, false);
+
 #if (EROFS_FS_ZIP_CACHE_LVL >= 2)
 	f.cachedzone_la = (erofs_off_t)page->index << PAGE_SHIFT;
 #endif
Signature · 1 line
2.14.4
author
#1 lore raw

PATCH 2/10 staging: erofs: remove the redundant d_rehash() for the root dentry

There is actually no need at all to d_rehash() for the root dentry as Al pointed out, fix it.

Reported-by Al Viro <viro at ZenIV.linux.org.uk>
Cc Al Viro <viro at ZenIV.linux.org.uk>
Signed-off-by Gao Xiang <gaoxiang25 at huawei.com>
---
 drivers/staging/erofs/super.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/staging/erofs/super.c +0 -6
index f69e619807a1..1ab3553c839b 100644
@@ -442,12 +442,6 @@ static int erofs_read_super(struct super_block *sb,
 
 	erofs_register_super(sb);
 
-	/*
-	 * We already have a positive dentry, which was instantiated
-	 * by d_make_root. Just need to d_rehash it.
-	 */
-	d_rehash(sb->s_root);
-
 	if (!silent)
 		infoln("mounted on %s with opts: %s.", dev_name,
 			(char *)data);
Signature · 1 line
2.14.4