From: Aditya Kali Date: Sat, 30 Jun 2012 23:10:57 +0000 (-0400) Subject: ext4: avoid uneeded calls to ext4_mb_load_buddy() while reading mb_groups X-Git-Tag: v3.6-rc1~69^2~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c8457cadc9cefe7ec920a2f3537ff1fe20f4061;p=pandora-kernel.git ext4: avoid uneeded calls to ext4_mb_load_buddy() while reading mb_groups Currently ext4_mb_load_buddy is called for every group, irrespective of whether the group info is already in memory, while reading /proc/fs/ext4//mb_groups proc file. For the purpose of mb_groups proc file, it is unnecessary to load the file group info from disk if it was loaded in past. These calls to ext4_mb_load_buddy make reading the mb_groups proc file expensive. Also, the locks around ext4_get_group_info are not required. This patch modifies the code to call ext4_mb_load_buddy only if the group info had never been loaded into memory in past. It also removes the mb group locking around ext4_get_group_info call. Signed-off-by: Aditya Kali Signed-off-by: "Theodore Ts'o" --- Reading git-diff-tree failed