OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 2/3] SUNRPC: traverse clients tree on PipeFS event
Re: [PATCH 2/3] SUNRPC: traverse clients tree on PipeFS event [message #46126 is a reply to message #46124] Thu, 26 April 2012 18:26 Go to previous messageGo to previous message
Stanislav Kinsbursky is currently offline  Stanislav Kinsbursky
Messages: 683
Registered: October 2011
Senior Member
26.04.2012 22:11, Myklebust, Trond написал:
> On Fri, 2012-04-20 at 18:19 +0400, Stanislav Kinsbursky wrote:
>
>> +static int __rpc_pipefs_event(struct rpc_clnt *clnt, unsigned long event,
>> + struct super_block *sb)
>> +{
>> + int error;
>> +
>> + if (!rpc_clnt_skip_event(clnt, event)) {
>> + error = __rpc_clnt_handle_event(clnt, event, sb);
>> + if (error)
>> + return error;
>> + }
>> + if (clnt != clnt->cl_parent)
>> + return __rpc_pipefs_event(clnt->cl_parent, event, sb);
>> + return 0;
>> +}
> Hi Stanislav,
>
> Recursion in the kernel is generally frowned upon due to the stack size
> limits. Could you please rewrite the above into a simple loop. Something
> along the lines of:
>
> for(;;) {
> ...
>
> if (clnt == clnt->cl_parent)
> break;
> clnt = clnt->cl_parent;
> }
>

Hi, Trond.
Yes, sure, I can do this.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH v3 2/2] decrement static keys on real destroy time
Next Topic: [PATCH v4 0/3] fix problem with static_branch() for sock memcg
Goto Forum:
  


Current Time: Mon Aug 04 23:46:03 GMT 2025

Total time taken to generate the page: 1.18964 seconds