linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Huang Jianan <jnhuang95@gmail.com>
To: linux-erofs@lists.ozlabs.org
Cc: guoweichao@oppo.com, zhangshiming@oppo.com
Subject: [PATCH 3/5] erofs-utils: fix the wrong address of inline dir content.
Date: Thu, 15 Oct 2020 21:39:57 +0800	[thread overview]
Message-ID: <20201015133959.61007-3-huangjianan@oppo.com> (raw)
In-Reply-To: <20201015133959.61007-1-huangjianan@oppo.com>

Signed-off-by: Huang Jianan <huangjianan@oppo.com>
Signed-off-by: Guo Weichao <guoweichao@oppo.com>
---
 fuse/namei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fuse/namei.c b/fuse/namei.c
index 21e6ba0..3503a8d 100644
--- a/fuse/namei.c
+++ b/fuse/namei.c
@@ -158,7 +158,7 @@ struct dcache_entry *disk_lookup(struct dcache_entry *parent, const char *name,
 	if (v.datalayout == EROFS_INODE_FLAT_INLINE) {
 		uint32_t dir_off = erofs_blkoff(dirsize);
 		off_t dir_addr = nid2addr(dcache_get_nid(parent))
-			+ sizeof(struct erofs_inode_compact);
+			+ sizeof(struct erofs_inode_compact) + v.xattr_isize;
 
 		memset(buf, 0, sizeof(buf));
 		ret = dev_read(buf, dir_off, dir_addr);
-- 
2.25.1


  parent reply	other threads:[~2020-10-15 13:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 13:39 [PATCH 1/5] erofs-utils: fix the conflict with the master branch Huang Jianan
2020-10-15 13:39 ` [PATCH 2/5] erofs-utils: fix the wrong name length of tail file in the directory Huang Jianan
2020-10-15 13:39 ` Huang Jianan [this message]
2020-10-16 15:36   ` [PATCH 3/5] erofs-utils: fix the wrong address of inline dir content Gao Xiang via Linux-erofs
2020-10-15 13:39 ` [PATCH 4/5] erofs-utils: support read special file Huang Jianan
2020-10-15 13:39 ` [PATCH 5/5] erofs-utils: support read compressed file Huang Jianan
2020-10-16 16:17   ` Gao Xiang via Linux-erofs
2020-10-17  6:24     ` jnhuang95
2020-10-17  6:36       ` Gao Xiang via Linux-erofs
2020-10-16 15:41 ` [PATCH 1/5] erofs-utils: fix the conflict with the master branch Gao Xiang via Linux-erofs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201015133959.61007-3-huangjianan@oppo.com \
    --to=jnhuang95@gmail.com \
    --cc=guoweichao@oppo.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=zhangshiming@oppo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).