mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 20:23:57 +08:00
ubifs: Use XATTR_*_PREFIX_LEN
...instead of open coding it. Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
170eb55f7d
commit
4fdd1d51ad
@ -267,7 +267,7 @@ static int check_namespace(const struct qstr *nm)
|
|||||||
|
|
||||||
if (!strncmp(nm->name, XATTR_TRUSTED_PREFIX,
|
if (!strncmp(nm->name, XATTR_TRUSTED_PREFIX,
|
||||||
XATTR_TRUSTED_PREFIX_LEN)) {
|
XATTR_TRUSTED_PREFIX_LEN)) {
|
||||||
if (nm->name[sizeof(XATTR_TRUSTED_PREFIX) - 1] == '\0')
|
if (nm->name[XATTR_TRUSTED_PREFIX_LEN] == '\0')
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
type = TRUSTED_XATTR;
|
type = TRUSTED_XATTR;
|
||||||
} else if (!strncmp(nm->name, XATTR_USER_PREFIX,
|
} else if (!strncmp(nm->name, XATTR_USER_PREFIX,
|
||||||
@ -277,7 +277,7 @@ static int check_namespace(const struct qstr *nm)
|
|||||||
type = USER_XATTR;
|
type = USER_XATTR;
|
||||||
} else if (!strncmp(nm->name, XATTR_SECURITY_PREFIX,
|
} else if (!strncmp(nm->name, XATTR_SECURITY_PREFIX,
|
||||||
XATTR_SECURITY_PREFIX_LEN)) {
|
XATTR_SECURITY_PREFIX_LEN)) {
|
||||||
if (nm->name[sizeof(XATTR_SECURITY_PREFIX) - 1] == '\0')
|
if (nm->name[XATTR_SECURITY_PREFIX_LEN] == '\0')
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
type = SECURITY_XATTR;
|
type = SECURITY_XATTR;
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user