Skip to content

Commit

Permalink
always update nlink in memory
Browse files Browse the repository at this point in the history
  • Loading branch information
SandyXSD committed Mar 3, 2023
1 parent 54608ea commit c151297
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/meta/tkv.go
Original file line number Diff line number Diff line change
Expand Up @@ -1104,8 +1104,8 @@ func (m *kvMeta) doMknod(ctx Context, parent Ino, name string, _type uint8, mode
now := time.Now()
if parent != TrashInode {
if _type == TypeDirectory {
pattr.Nlink++
if tx.retry < 10 {
pattr.Nlink++
updateParent = true
} else {
logger.Warnf("Skip updating nlink of directory %d to reduce conflic", parent)
Expand Down

0 comments on commit c151297

Please sign in to comment.