Created
December 1, 2018 23:28
-
-
Save fcicq/da547ab7d016fa87c5034108bbd12fa3 to your computer and use it in GitHub Desktop.
shmem: enable user xattr for tmpfs, for android-x86, original from https://www.spinics.net/lists/linux-mm/msg109775.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mm/shmem.c b/mm/shmem.c | |
index 446942677cd4..ba6ddaa4f862 100644 | |
--- a/mm/shmem.c | |
+++ b/mm/shmem.c | |
@@ -3157,6 +3157,12 @@ static int shmem_xattr_handler_set(const struct xattr_handler *handler, | |
return simple_xattr_set(&info->xattrs, name, value, size, flags); | |
} | |
+static const struct xattr_handler shmem_user_xattr_handler = { | |
+ .prefix = XATTR_USER_PREFIX, | |
+ .get = shmem_xattr_handler_get, | |
+ .set = shmem_xattr_handler_set, | |
+}; | |
+ | |
static const struct xattr_handler shmem_security_xattr_handler = { | |
.prefix = XATTR_SECURITY_PREFIX, | |
.get = shmem_xattr_handler_get, | |
@@ -3174,6 +3180,7 @@ static const struct xattr_handler *shmem_xattr_handlers[] = { | |
&posix_acl_access_xattr_handler, | |
&posix_acl_default_xattr_handler, | |
#endif | |
+ &shmem_user_xattr_handler, | |
&shmem_security_xattr_handler, | |
&shmem_trusted_xattr_handler, | |
NULL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment