diff --git a/pkg/fs/client/meta/meta_kv.go b/pkg/fs/client/meta/meta_kv.go index d88b8cbc8..90f9c0707 100644 --- a/pkg/fs/client/meta/meta_kv.go +++ b/pkg/fs/client/meta/meta_kv.go @@ -1471,6 +1471,10 @@ func (m *kvMeta) Readdir(ctx *Context, inode Ino, entries *[]*Entry) syscall.Err } err := m.txn(func(tx kv.KvTxn) error { buf := tx.Get(m.inodeKey(inode)) + if buf == nil { + log.Errorf("get attr dir inode %v empty", inode) + return syscall.ENOENT + } m.parseInode(buf, dirInodeItem) parentIno = dirInodeItem.parentIno entry := tx.Get(m.entryKey(parentIno, string(dirInodeItem.name)))