This commit is contained in:
Chris Lu
2021-05-09 15:22:38 -07:00
parent 93e84a12f2
commit 735e65be17
3 changed files with 7 additions and 8 deletions

View File

@@ -35,14 +35,13 @@ type FileHandle struct {
writeOnly bool
}
func newFileHandle(file *File, uid, gid uint32) *FileHandle {
func newFileHandle(file *File, uid, gid uint32, writeOnly bool) *FileHandle {
fh := &FileHandle{
f: file,
dirtyPages: newDirtyPages(file),
dirtyPages: newDirtyPages(file, writeOnly),
Uid: uid,
Gid: gid,
}
fh.dirtyPages.fh = fh
entry := fh.f.getEntry()
if entry != nil {
entry.Attributes.FileSize = filer.FileSize(entry)