diff options
| author | chrislu <chris.lu@gmail.com> | 2021-12-20 01:11:43 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2021-12-20 01:11:43 -0800 |
| commit | 4fd29dad868916d39d27b6d4a5184e73cc254ebb (patch) | |
| tree | 475dcda39c5f53316cfe7d0b410598659ec717e4 /weed/filesys/wfs.go | |
| parent | bc96682760f5fbbb198210cdc7354d4451906ed2 (diff) | |
| download | seaweedfs-4fd29dad868916d39d27b6d4a5184e73cc254ebb.tar.xz seaweedfs-4fd29dad868916d39d27b6d4a5184e73cc254ebb.zip | |
remove writeOnly flag
Diffstat (limited to 'weed/filesys/wfs.go')
| -rw-r--r-- | weed/filesys/wfs.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go index 92f6bae38..aa4f9dacd 100644 --- a/weed/filesys/wfs.go +++ b/weed/filesys/wfs.go @@ -148,7 +148,7 @@ func (wfs *WFS) Root() (fs.Node, error) { return wfs.root, nil } -func (wfs *WFS) AcquireHandle(file *File, uid, gid uint32, writeOnly bool) (fileHandle *FileHandle) { +func (wfs *WFS) AcquireHandle(file *File, uid, gid uint32) (fileHandle *FileHandle) { fullpath := file.fullpath() glog.V(4).Infof("AcquireHandle %s uid=%d gid=%d", fullpath, uid, gid) @@ -160,7 +160,6 @@ func (wfs *WFS) AcquireHandle(file *File, uid, gid uint32, writeOnly bool) (file if found && existingHandle != nil && existingHandle.f.isOpen > 0 { existingHandle.f.isOpen++ wfs.handlesLock.Unlock() - existingHandle.dirtyPages.SetWriteOnly(writeOnly) glog.V(4).Infof("Reuse AcquiredHandle %s open %d", fullpath, existingHandle.f.isOpen) return existingHandle } @@ -168,7 +167,7 @@ func (wfs *WFS) AcquireHandle(file *File, uid, gid uint32, writeOnly bool) (file entry, _ := file.maybeLoadEntry(context.Background()) file.entry = entry - fileHandle = newFileHandle(file, uid, gid, writeOnly) + fileHandle = newFileHandle(file, uid, gid) wfs.handlesLock.Lock() file.isOpen++ |
