From: Mikulas Patocka Date: Thu, 21 Jul 2011 23:59:22 +0000 (-0400) Subject: sysfs: count subdirectories X-Git-Tag: v3.2-rc1~184^2~35 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f9838fd01833ffb30177d964983076924344c9e;p=pandora-kernel.git sysfs: count subdirectories sysfs: count subdirectories This patch introduces a subdirectory counter for each sysfs directory. Without the patch, sysfs_refresh_inode would walk all entries of the directory to calculate the number of subdirectories. This patch improves time of "ls -la /sys/block" when there are 10000 block devices from 9 seconds to 0.19 seconds. Signed-off-by: Mikulas Patocka Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed