| files[m] = mkfile(m1, md, # links(m, dirs), content), of0[fd] = mkfile(m, mode, m0), fs = abs-files(files), ofh = abs-of(of0), # links(m, dirs) ≠ 0, links(m, dirs) ≠ ∅, m ≠ ROOT_INO, root.dir?, dom of0 < ino0, abs(root, ROOT_INO)(dirs), afs-cons(dirs, files), fids-cons(root, abs-files(files), abs-of(of0)), of-cons(of0, dirs, files), of-cons(of0 -- fd, dirs, files), m ∈ files, fd ∈ of0, ¬ is-open(m, of0 -- fd), psynced → asynced ⊦ ∃ err. pre-close(fd, err, user, root, fs, ofh) ∧ ⟨err0 := err; if err0 = ESUCCESS then let fid = ofh[fd].fid in {ofh := ofh -- fd; if ¬ fid ∈ ofh.fids ∧ ¬ fid ∈ root.fids then fs := fs -- fid}⟩ (ofh = abs-of(of0 -- fd) ∧ fs = abs-files(files) ∧ (psynced → asynced) ∧ ESUCCESS = err0) |
of0[fd] = mkfile(m, mode, m0), files[m] = mkfile(m1, md, # links(m, dirs), content), fs = abs-files(files), ofh = abs-of(of0), root.dir?, dom of0 < ino0, abs(root, ROOT_INO)(dirs), afs-cons(dirs, files), fids-cons(root, abs-files(files), abs-of(of0)), of-cons(of0 -- fd, dirs, files), of-cons(of0, dirs, files), fd ∈ of0, m ∈ files, psynced → asynced ⊦ pre-close(fd, ESUCCESS, user, root, fs, ofh) ∧ ⟨err0 := ESUCCESS; if err0 = ESUCCESS then let fid = ofh[fd].fid in {ofh := ofh -- fd; if ¬ fid ∈ ofh.fids ∧ ¬ fid ∈ root.fids then fs := fs -- fid}⟩ (ofh = abs-of(of0 -- fd) ∧ fs = abs-files(files) ∧ (psynced → asynced) ∧ ESUCCESS = err0), # links(m, dirs) = 0, links(m, dirs) = ∅, m = ROOT_INO, is-open(m, of0 -- fd)
Used terms: ESUCCESS