Skip to content

Commit

Permalink
fix: evict target inode when overwrite rename
Browse files Browse the repository at this point in the history
Signed-off-by: yinlei-jinan <[email protected]>
  • Loading branch information
yinlei-github committed May 22, 2020
1 parent 0db065b commit c775011
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sdk/meta/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ func (mw *MetaWrapper) Rename_ll(srcParentID uint64, srcName string, dstParentID
inodeMP := mw.getPartitionByInode(oldInode)
if inodeMP != nil {
mw.iunlink(inodeMP, oldInode)
// evict oldInode to avoid oldInode becomes orphan inode
mw.ievict(inodeMP, oldInode)
}
}

Expand Down

0 comments on commit c775011

Please sign in to comment.