lkml.org 
[lkml]   [2008]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] proc: stop using BKL
On Fri, Oct 24, 2008 at 03:46:06PM +0400, Alexey Dobriyan wrote:
> 3) proc_readdir_de()
> --------------------
> "." and ".." part doesn't need BKL, walking PDE list is under
> proc_subdir_lock, calling filldir callback is potentially blocking
> because it writes to luserspace. All proc_readdir_de() callers
> eventually come from ->readdir hook which is under directory's
> ->i_mutex -- BKL doesn't protect anything.
>
> 4) proc_root_readdir_de()
> -------------------------
> proc_root_readdir_de is ->readdir hook, see (3).
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

Once you stop taking BKL in readdir you also need to switch to
generic_file_llseek for those directories. It would be good if you
could switch the fallback proc_reg_llseek to no llseek at all in
proc_reg_llseek while you're at it. I'll prepare a similar change
for non-procfs fops instances.



\
 
 \ /
  Last update: 2008-10-24 17:57    [W:0.033 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site