Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 03b5bb34 authored by Wang Sheng-Hui's avatar Wang Sheng-Hui Committed by Jan Kara
Browse files

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: default avatarWang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent c878c73f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment