summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/file_handle_cache.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl
index f3b4dbafa2..13ee42499a 100644
--- a/src/file_handle_cache.erl
+++ b/src/file_handle_cache.erl
@@ -374,11 +374,11 @@ sync(Ref) ->
end).
needs_sync(Ref) ->
- with_handles(
- [Ref],
- fun ([#handle { is_dirty = false, write_buffer = [] }]) -> false;
- ([_Handle]) -> true
- end).
+ %% This must *not* use with_handles/2; see bug 25052
+ case get({Ref, fhc_handle}) of
+ #handle { is_dirty = false, write_buffer = [] } -> false;
+ #handle {} -> true
+ end.
position(Ref, NewOffset) ->
with_flushed_handles(