Read on-disk ino and store it in i_ino[0].

Signed-off-by: Jingbo Xu <[email protected]>
---
 lib/namei.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/namei.c b/lib/namei.c
index 1023a9a..2bb1d4c 100644
--- a/lib/namei.c
+++ b/lib/namei.c
@@ -60,6 +60,7 @@ int erofs_read_inode_from_disk(struct erofs_inode *vi)
                die = (struct erofs_inode_extended *)buf;
                vi->xattr_isize = erofs_xattr_ibody_size(die->i_xattr_icount);
                vi->i_mode = le16_to_cpu(die->i_mode);
+               vi->i_ino[0] = le32_to_cpu(die->i_ino);
 
                switch (vi->i_mode & S_IFMT) {
                case S_IFREG:
@@ -95,6 +96,7 @@ int erofs_read_inode_from_disk(struct erofs_inode *vi)
                vi->inode_isize = sizeof(struct erofs_inode_compact);
                vi->xattr_isize = erofs_xattr_ibody_size(dic->i_xattr_icount);
                vi->i_mode = le16_to_cpu(dic->i_mode);
+               vi->i_ino[0] = le32_to_cpu(dic->i_ino);
 
                switch (vi->i_mode & S_IFMT) {
                case S_IFREG:
-- 
2.19.1.6.gb485710b

Reply via email to