diff options
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index adf8033afd52..3cd32c2ea0a0 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -2042,27 +2042,28 @@ static const struct inode_operations shmem_symlink_inode_operations = { | |||
2042 | * filesystem level, though. | 2042 | * filesystem level, though. |
2043 | */ | 2043 | */ |
2044 | 2044 | ||
2045 | static size_t shmem_xattr_security_list(struct inode *inode, char *list, | 2045 | static size_t shmem_xattr_security_list(struct dentry *dentry, char *list, |
2046 | size_t list_len, const char *name, | 2046 | size_t list_len, const char *name, |
2047 | size_t name_len) | 2047 | size_t name_len, int handler_flags) |
2048 | { | 2048 | { |
2049 | return security_inode_listsecurity(inode, list, list_len); | 2049 | return security_inode_listsecurity(dentry->d_inode, list, list_len); |
2050 | } | 2050 | } |
2051 | 2051 | ||
2052 | static int shmem_xattr_security_get(struct inode *inode, const char *name, | 2052 | static int shmem_xattr_security_get(struct dentry *dentry, const char *name, |
2053 | void *buffer, size_t size) | 2053 | void *buffer, size_t size, int handler_flags) |
2054 | { | 2054 | { |
2055 | if (strcmp(name, "") == 0) | 2055 | if (strcmp(name, "") == 0) |
2056 | return -EINVAL; | 2056 | return -EINVAL; |
2057 | return xattr_getsecurity(inode, name, buffer, size); | 2057 | return xattr_getsecurity(dentry->d_inode, name, buffer, size); |
2058 | } | 2058 | } |
2059 | 2059 | ||
2060 | static int shmem_xattr_security_set(struct inode *inode, const char *name, | 2060 | static int shmem_xattr_security_set(struct dentry *dentry, const char *name, |
2061 | const void *value, size_t size, int flags) | 2061 | const void *value, size_t size, int flags, int handler_flags) |
2062 | { | 2062 | { |
2063 | if (strcmp(name, "") == 0) | 2063 | if (strcmp(name, "") == 0) |
2064 | return -EINVAL; | 2064 | return -EINVAL; |
2065 | return security_inode_setsecurity(inode, name, value, size, flags); | 2065 | return security_inode_setsecurity(dentry->d_inode, name, value, |
2066 | size, flags); | ||
2066 | } | 2067 | } |
2067 | 2068 | ||
2068 | static struct xattr_handler shmem_xattr_security_handler = { | 2069 | static struct xattr_handler shmem_xattr_security_handler = { |