diff options
author | Jianyu Zhan <[email protected]> | 2014-04-17 17:52:10 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2014-04-25 12:25:13 -0700 |
commit | c1befb885939cdaaf420c10bbe9ff57aa00446ea (patch) | |
tree | e46f5797e3b17838b41f874f70facaf7b52bfea5 /net/lapb/lapb_out.c | |
parent | a798c10faf62a505d24e5f6213fbaf904a39623f (diff) |
kernfs: fix a subdir count leak
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 <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'net/lapb/lapb_out.c')
0 files changed, 0 insertions, 0 deletions