lkml.org 
[lkml]   [2014]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernfs: fix a subdir count leak
On Thu, Apr 17, 2014 at 05:52:10PM +0800, Jianyu Zhan wrote:
> Currently kernfs_link_sibling() increates parent->dir.subdirs before
> adding the node into parent's chidren rb tree.
>
> Because it is possible that kernfs_link_sibling() couldn't find
> a suitable slot and bail out, this leads to a mismatch between
> elevated subdir count with actual children node numbers.
>
> This patches fix this problem, by moving the subdir accouting
> after the actual addtion happening.
>
> Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

--
tejun


\
 
 \ /
  Last update: 2014-04-17 15:41    [W:0.730 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site