diff --git a/pkg/meta/tkv.go b/pkg/meta/tkv.go index 03c283f911c4..222e7a55ae0c 100644 --- a/pkg/meta/tkv.go +++ b/pkg/meta/tkv.go @@ -3323,6 +3323,16 @@ func (m *kvMeta) DumpMeta(w io.Writer, root Ino, keepSecret, fast, skipTrash boo tree = m.snap[root] if !skipTrash { trash = m.snap[TrashInode] + if trash == nil { + trash = &DumpedEntry{ + Attr: &DumpedAttr{ + Inode: TrashInode, + Type: "directory", + Nlink: 2, + }, + } + m.snap[TrashInode] = trash + } } } else { tree = &DumpedEntry{