Release is called when we are finished with the file handle It isn't called directly from userspace so the error is ignored by the kernel
()
| 202 | // It isn't called directly from userspace so the error is ignored by |
| 203 | // the kernel |
| 204 | func (fh *RWFileHandle) Release() error { |
| 205 | fh.mu.Lock() |
| 206 | defer fh.mu.Unlock() |
| 207 | fs.Debugf(fh.logPrefix(), "RWFileHandle.Release") |
| 208 | if fh.closed { |
| 209 | // Don't return an error if called twice |
| 210 | return nil |
| 211 | } |
| 212 | err := fh.close() |
| 213 | if err != nil { |
| 214 | fs.Errorf(fh.logPrefix(), "RWFileHandle.Release error: %v", err) |
| 215 | } |
| 216 | return err |
| 217 | } |
| 218 | |
| 219 | // _size returns the size of the underlying file and also sets it in |
| 220 | // the owning file |