tipc: Refactor __tipc_nl_compat_doit
authorYing Xue <ying.xue@windriver.com>
Wed, 14 Feb 2018 05:37:58 +0000 (13:37 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Feb 2018 19:46:32 +0000 (14:46 -0500)
commite5d1a1eec0f4b51d0a7a6457d0b1b99b34f3e901
tree73be7be8911658b34337ca861ce2efdb1f62e535
parent361b1231801944ddecbd0e383420932633cac2d1
tipc: Refactor __tipc_nl_compat_doit

As preparation for adding RTNL to make (*cmd->transcode)() and
(*cmd->transcode)() constantly protected by RTNL lock, we move out of
memory allocations existing between them as many as possible so that
the time of holding RTNL can be minimized in __tipc_nl_compat_doit().

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/netlink_compat.c