diff --git a/rafs/src/metadata/direct_v6.rs b/rafs/src/metadata/direct_v6.rs
index faf504c3ea6..80150713f18 100644
--- a/rafs/src/metadata/direct_v6.rs
+++ b/rafs/src/metadata/direct_v6.rs
@@ -189,7 +189,7 @@ impl DirectSuperBlockV6 {
offset,
blocks_count,
parent_inode: Cell::new(None),
- name: Cell::new(None),
+ name: RefCell::new(None),
})
}
@@ -206,7 +206,7 @@ impl DirectSuperBlockV6 {
// # Safety
// inode always valid
inode.parent_inode = Cell::new(Some(parent_inode));
- inode.name = Cell::new(Some(name));
+ inode.name = RefCell::new(Some(name));
inode
})
}
@@ -397,7 +397,7 @@ pub struct OndiskInodeWrapper {
// this time parent_inode field is None, the other Inodes are created through OndiskInodeWrapper,
// this field will be filled with inode_wrapper_with_parent
parent_inode: Cell