processDeferredDecRefs calls vfs.Dentry.DecRef on all dentries in the deferredDecRefs list. See comment on Filesystem.mu. Precondition: Filesystem.mu or Dentry.dirMu must NOT be locked.
(ctx context.Context)
| 175 | // |
| 176 | // Precondition: Filesystem.mu or Dentry.dirMu must NOT be locked. |
| 177 | func (fs *Filesystem) processDeferredDecRefs(ctx context.Context) { |
| 178 | fs.deferredDecRefsMu.Lock() |
| 179 | for _, d := range fs.deferredDecRefs { |
| 180 | // Defer the DecRef call so that we are not holding deferredDecRefsMu |
| 181 | // when DecRef is called. |
| 182 | defer d.DecRef(ctx) |
| 183 | } |
| 184 | fs.deferredDecRefs = fs.deferredDecRefs[:0] // Keep slice memory for reuse. |
| 185 | fs.deferredDecRefsMu.Unlock() |
| 186 | } |
| 187 | |
| 188 | // VFSFilesystem returns the generic vfs filesystem object. |
| 189 | func (fs *Filesystem) VFSFilesystem() *vfs.Filesystem { |
no test coverage detected