summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2010-08-20 16:09:09 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2010-08-20 16:09:09 +0100
commitcddda05d40947735d5dbd4566b5ee323cd3b38b8 (patch)
treed1deb6f8a82bcb4b407ebd12ce79fd778795bf1c
parentd6222e5f8b3d1d7bc011655a8894eee2a0007429 (diff)
downloadrabbitmq-server-git-cddda05d40947735d5dbd4566b5ee323cd3b38b8.tar.gz
simplification due to the fact that we always request closing of all
-rw-r--r--src/file_handle_cache.erl12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl
index b90f8bee33..60991e1dd8 100644
--- a/src/file_handle_cache.erl
+++ b/src/file_handle_cache.erl
@@ -994,14 +994,12 @@ notify(_Clients, _Required, []) ->
ok;
notify(_Clients, Required, _Notifications) when Required =< 0 ->
ok;
-notify(Clients, Required, [#cstate{ callback = {M, F, A}, opened = Opened,
- pid = Pid, pending_closes = PendingCloses }
- | Notifications]) ->
- Closable = Opened - PendingCloses,
+notify(Clients, Required, [#cstate{ pid = Pid,
+ callback = {M, F, A},
+ opened = Opened } | Notifications]) ->
apply(M, F, A ++ [0]),
- ets:update_element(Clients, Pid,
- {#cstate.pending_closes, PendingCloses + Closable}),
- notify(Clients, Required - Closable, Notifications).
+ ets:update_element(Clients, Pid, {#cstate.pending_closes, Opened}),
+ notify(Clients, Required - Opened, Notifications).
ensure_mref(Pid, Clients) ->
case ets:insert_new(Clients, #cstate { pid = Pid,