Skip to content

Commit

Permalink
quota: fixed a bug where hardlink's quota update in the same director…
Browse files Browse the repository at this point in the history
…y was incorrect (#5069)
  • Loading branch information
zhijian-pro authored Aug 9, 2024
1 parent d7cb77e commit 2c92dce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/meta/quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ func (m *baseMeta) updateParentStat(ctx Context, inode, parent Ino, length, spac
m.updateDirQuota(ctx, parent, space, 0)
} else {
go func() {
for p := range m.en.doGetParents(ctx, inode) {
m.updateDirStat(ctx, p, length, space, 0)
m.updateDirQuota(ctx, p, space, 0)
for p, v := range m.en.doGetParents(ctx, inode) {
m.updateDirStat(ctx, p, length*int64(v), space*int64(v), 0)
m.updateDirQuota(ctx, p, space*int64(v), 0)
}
}()
}
Expand Down

0 comments on commit 2c92dce

Please sign in to comment.