diff options
Diffstat (limited to 'fs/reiserfs/xattr_security.c')
-rw-r--r-- | fs/reiserfs/xattr_security.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/reiserfs/xattr_security.c b/fs/reiserfs/xattr_security.c index 4d3c20e787c3..a92c8792c0f6 100644 --- a/fs/reiserfs/xattr_security.c +++ b/fs/reiserfs/xattr_security.c | |||
@@ -55,8 +55,16 @@ int reiserfs_security_init(struct inode *dir, struct inode *inode, | |||
55 | struct reiserfs_security_handle *sec) | 55 | struct reiserfs_security_handle *sec) |
56 | { | 56 | { |
57 | int blocks = 0; | 57 | int blocks = 0; |
58 | int error = security_inode_init_security(inode, dir, &sec->name, | 58 | int error; |
59 | &sec->value, &sec->length); | 59 | |
60 | sec->name = NULL; | ||
61 | |||
62 | /* Don't add selinux attributes on xattrs - they'll never get used */ | ||
63 | if (IS_PRIVATE(dir)) | ||
64 | return 0; | ||
65 | |||
66 | error = security_inode_init_security(inode, dir, &sec->name, | ||
67 | &sec->value, &sec->length); | ||
60 | if (error) { | 68 | if (error) { |
61 | if (error == -EOPNOTSUPP) | 69 | if (error == -EOPNOTSUPP) |
62 | error = 0; | 70 | error = 0; |