linux/fs/kernfs
Jianyu Zhan c1befb8859 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 <nasa4836@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25 12:25:13 -07:00
..
dir.c kernfs: fix a subdir count leak 2014-04-25 12:25:13 -07:00
file.c kernfs: cache atomic_write_len in kernfs_open_file 2014-03-08 22:08:29 -08:00
inode.c kernfs: protect lazy kernfs_iattrs allocation with mutex 2014-04-16 11:54:40 -07:00
Kconfig kernfs: add CONFIG_KERNFS 2014-02-07 16:08:57 -08:00
kernfs-internal.h kernfs: fix kernfs_node_from_dentry() 2014-02-14 14:31:37 -08:00
Makefile sysfs, kernfs: add skeletons for kernfs 2013-11-27 13:28:24 -08:00
mount.c Merge 3.14-rc5 into driver-core-next 2014-03-02 20:09:08 -08:00
symlink.c kernfs: remove kernfs_addrm_cxt 2014-02-07 15:42:40 -08:00