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

Commit 05a9a05b authored by Richard Weinberger's avatar Richard Weinberger Committed by Nikhilesh Reddy
Browse files

ubifs: Use XATTR_*_PREFIX_LEN



...instead of open coding it.

CRs-Fixed: 975289
Change-Id: I2d2b2fecfd6724baddb1d93ec5b4aeb2587b577f
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Git-commit: 4fdd1d51ad5d059548c6539ac9d281f74d24bcbe
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarNikhilesh Reddy <reddyn@codeaurora.org>
parent e4627b50
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ static int check_namespace(const struct qstr *nm)

	if (!strncmp(nm->name, XATTR_TRUSTED_PREFIX,
		     XATTR_TRUSTED_PREFIX_LEN)) {
		if (nm->name[sizeof(XATTR_TRUSTED_PREFIX) - 1] == '\0')
		if (nm->name[XATTR_TRUSTED_PREFIX_LEN] == '\0')
			return -EINVAL;
		type = TRUSTED_XATTR;
	} else if (!strncmp(nm->name, XATTR_USER_PREFIX,
@@ -277,7 +277,7 @@ static int check_namespace(const struct qstr *nm)
		type = USER_XATTR;
	} else if (!strncmp(nm->name, XATTR_SECURITY_PREFIX,
				     XATTR_SECURITY_PREFIX_LEN)) {
		if (nm->name[sizeof(XATTR_SECURITY_PREFIX) - 1] == '\0')
		if (nm->name[XATTR_SECURITY_PREFIX_LEN] == '\0')
			return -EINVAL;
		type = SECURITY_XATTR;
	} else