Browse Source

read source uses shared lock

test-reverting-lock-table
chrislu 1 year ago
parent
commit
186b1f029b
  1. 2
      weed/mount/weedfs_file_copy_range.go

2
weed/mount/weedfs_file_copy_range.go

@ -53,7 +53,7 @@ func (wfs *WFS) CopyFileRange(cancel <-chan struct{}, in *fuse.CopyFileRangeIn)
} }
if fhIn.fh != fhOut.fh { if fhIn.fh != fhOut.fh {
fhInActiveLock := fhIn.wfs.fhLockTable.AcquireLock("CopyFileRange", fhIn.fh, util.ExclusiveLock)
fhInActiveLock := fhIn.wfs.fhLockTable.AcquireLock("CopyFileRange", fhIn.fh, util.SharedLock)
defer fhIn.wfs.fhLockTable.ReleaseLock(fhIn.fh, fhInActiveLock) defer fhIn.wfs.fhLockTable.ReleaseLock(fhIn.fh, fhInActiveLock)
} }

Loading…
Cancel
Save