diff options
Diffstat (limited to 'fs/ext3/xattr_security.c')
-rw-r--r-- | fs/ext3/xattr_security.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/fs/ext3/xattr_security.c b/fs/ext3/xattr_security.c index 37b81097bdf2..3af91f476dff 100644 --- a/fs/ext3/xattr_security.c +++ b/fs/ext3/xattr_security.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/string.h> | 8 | #include <linux/string.h> |
8 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
9 | #include <linux/ext3_jbd.h> | 10 | #include <linux/ext3_jbd.h> |
@@ -12,8 +13,8 @@ | |||
12 | #include "xattr.h" | 13 | #include "xattr.h" |
13 | 14 | ||
14 | static size_t | 15 | static size_t |
15 | ext3_xattr_security_list(struct inode *inode, char *list, size_t list_size, | 16 | ext3_xattr_security_list(struct dentry *dentry, char *list, size_t list_size, |
16 | const char *name, size_t name_len) | 17 | const char *name, size_t name_len, int type) |
17 | { | 18 | { |
18 | const size_t prefix_len = XATTR_SECURITY_PREFIX_LEN; | 19 | const size_t prefix_len = XATTR_SECURITY_PREFIX_LEN; |
19 | const size_t total_len = prefix_len + name_len + 1; | 20 | const size_t total_len = prefix_len + name_len + 1; |
@@ -28,23 +29,23 @@ ext3_xattr_security_list(struct inode *inode, char *list, size_t list_size, | |||
28 | } | 29 | } |
29 | 30 | ||
30 | static int | 31 | static int |
31 | ext3_xattr_security_get(struct inode *inode, const char *name, | 32 | ext3_xattr_security_get(struct dentry *dentry, const char *name, |
32 | void *buffer, size_t size) | 33 | void *buffer, size_t size, int type) |
33 | { | 34 | { |
34 | if (strcmp(name, "") == 0) | 35 | if (strcmp(name, "") == 0) |
35 | return -EINVAL; | 36 | return -EINVAL; |
36 | return ext3_xattr_get(inode, EXT3_XATTR_INDEX_SECURITY, name, | 37 | return ext3_xattr_get(dentry->d_inode, EXT3_XATTR_INDEX_SECURITY, |
37 | buffer, size); | 38 | name, buffer, size); |
38 | } | 39 | } |
39 | 40 | ||
40 | static int | 41 | static int |
41 | ext3_xattr_security_set(struct inode *inode, const char *name, | 42 | ext3_xattr_security_set(struct dentry *dentry, const char *name, |
42 | const void *value, size_t size, int flags) | 43 | const void *value, size_t size, int flags, int type) |
43 | { | 44 | { |
44 | if (strcmp(name, "") == 0) | 45 | if (strcmp(name, "") == 0) |
45 | return -EINVAL; | 46 | return -EINVAL; |
46 | return ext3_xattr_set(inode, EXT3_XATTR_INDEX_SECURITY, name, | 47 | return ext3_xattr_set(dentry->d_inode, EXT3_XATTR_INDEX_SECURITY, |
47 | value, size, flags); | 48 | name, value, size, flags); |
48 | } | 49 | } |
49 | 50 | ||
50 | int | 51 | int |