Skip to content

Commit

Permalink
fuse 遍历目录的时候inode节点可能被删除导致panic问题修复 (PaddlePaddle#1329)
Browse files Browse the repository at this point in the history
* fuse 遍历目录的时候inode节点可能被删除导致panic问题修复

* fuse 遍历目录的时候inode节点可能被删除导致panic问题修复
  • Loading branch information
luoyuedong authored Mar 6, 2024
1 parent 7a7b38a commit f3c7447
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/fs/client/meta/meta_kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit f3c7447

Please sign in to comment.