create: set f.entry after creating files
After Tcreate on a file, the fid is open and should be usable for read/write without a separate Topen. Set f.entry via root.Open() after creation so subsequent reads/writes on the same fid work.
This commit is contained in:
parent
b23785a4d9
commit
bb152f401d
|
|
@ -457,6 +457,9 @@ func create(root *fs.Tree, cs *connState, fc *plan9.Fcall) *plan9.Fcall {
|
|||
f.path = newPath
|
||||
f.qid = qid
|
||||
f.mode = fc.Mode
|
||||
if ent, err := root.Open(rel); err == nil {
|
||||
f.entry = ent
|
||||
}
|
||||
return &plan9.Fcall{Type: plan9.Rcreate, Tag: fc.Tag, Qid: qid}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue