summaryrefslogtreecommitdiffhomepage
path: root/pkg/tmutex/tmutex.go
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2018-08-29 11:21:21 -0700
committerShentubot <shentubot@google.com>2018-08-29 11:22:27 -0700
commit18932476167ecf16b7d3e85ae6addaaba193ceed (patch)
tree9bb9f470e83f844df4c245982c9cdbe47508c87f /pkg/tmutex/tmutex.go
parent52e6714146b46487a1260fab838a6ba193029845 (diff)
fs: Drop reference to over-written file before renaming over it.
dirent.go:Rename() walks to the file being replaced and defers replaced.DecRef(). After the rename, the reference is dropped, triggering a writeout and SettAttr call to the gofer. Because of lazyOpenForWrite, the gofer opens the replaced file BY ITS OLD NAME and calls ftruncate on it. This CL changes Remove to drop the reference on replaced (and thus trigger writeout) before the actual rename call. PiperOrigin-RevId: 210756097 Change-Id: I01ea09a5ee6c2e2d464560362f09943641638e0f
Diffstat (limited to 'pkg/tmutex/tmutex.go')
0 files changed, 0 insertions, 0 deletions