From: Wang Sheng-Hui Date: Fri, 22 Jul 2011 13:50:13 +0000 (-0500) Subject: ext2: check xattr name_len before acquiring xattr_sem in ext2_xattr_get X-Git-Tag: v3.1-rc1~224^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03b5bb342978f99f75fb36d69cd29bab32109fd4;p=pandora-kernel.git ext2: check xattr name_len before acquiring xattr_sem in ext2_xattr_get In ext2_xattr_get(), the code will acquire xattr_sem first, later checks the length of xattr name_len > 255. It's unnecessarily time consuming and also ext2_xattr_set() checks the length before other checks. So move the check before acquiring xattr_sem to make these two functions consistent. Signed-off-by: Wang Sheng-Hui Signed-off-by: Jan Kara --- Reading git-diff-tree failed