aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/disk_log_server.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel/src/disk_log_server.erl')
-rw-r--r--lib/kernel/src/disk_log_server.erl12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/kernel/src/disk_log_server.erl b/lib/kernel/src/disk_log_server.erl
index 684ea5b5db..45334912eb 100644
--- a/lib/kernel/src/disk_log_server.erl
+++ b/lib/kernel/src/disk_log_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -199,7 +199,7 @@ do_open({open, W, #arg{name = Name}=A}=Req, From, State) ->
false when W =:= local ->
case A#arg.distributed of
{true, Nodes} ->
- Fun = fun() -> open_distr_rpc(Nodes, A, From) end,
+ Fun = open_distr_rpc_fun(Nodes, A, From),
_Pid = spawn(Fun),
%% No pending reply is expected, but don't reply yet.
{pending, State};
@@ -225,11 +225,15 @@ do_open({open, W, #arg{name = Name}=A}=Req, From, State) ->
end
end.
+-spec open_distr_rpc_fun([node()], _, _) -> % XXX: underspecified
+ fun(() -> no_return()).
+
+open_distr_rpc_fun(Nodes, A, From) ->
+ fun() -> open_distr_rpc(Nodes, A, From) end.
+
%% Spawning a process is a means to avoid deadlock when
%% disk_log_servers mutually open disk_logs.
--spec open_distr_rpc([node()], _, _) -> no_return(). % XXX: underspecified
-
open_distr_rpc(Nodes, A, From) ->
{AllReplies, BadNodes} = rpc:multicall(Nodes, ?MODULE, dist_open, [A]),
{Ok, Bad} = cr(AllReplies, [], []),