From: Theodore Ts'o Date: Thu, 6 Jun 2013 15:40:37 +0000 (-0400) Subject: ext4: optimize test_root() X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~83^2~30 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4afb4f4e3e9af626ad695c87e4f9aaa780b29ec;p=pandora-kernel.git ext4: optimize test_root() The test_root() function could potentially loop forever due to overflow issues. So rewrite test_root() to avoid this issue; as a bonus, it is 38% faster when benchmarked via a test loop: int main(int argc, char **argv) { int i; for (i = 0; i < 1 << 24; i++) { if (test_root(i, 7)) printf("%d\n", i); } } Signed-off-by: "Theodore Ts'o" --- Reading git-diff-tree failed