lkml.org 
[lkml]   [2012]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] SUNRPC: traverse clients tree on PipeFS event
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-04-26 20:33    [W:0.069 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site