diff options
Diffstat (limited to 'include/linux/reiserfs_xattr.h')
-rw-r--r-- | include/linux/reiserfs_xattr.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 20eca09729a2..dcae01e63e40 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -15,6 +15,12 @@ struct reiserfs_xattr_header { | |||
15 | __le32 h_hash; /* hash of the value */ | 15 | __le32 h_hash; /* hash of the value */ |
16 | }; | 16 | }; |
17 | 17 | ||
18 | struct reiserfs_security_handle { | ||
19 | char *name; | ||
20 | void *value; | ||
21 | size_t length; | ||
22 | }; | ||
23 | |||
18 | #ifdef __KERNEL__ | 24 | #ifdef __KERNEL__ |
19 | 25 | ||
20 | #include <linux/init.h> | 26 | #include <linux/init.h> |
@@ -54,6 +60,14 @@ int reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *, | |||
54 | extern struct xattr_handler reiserfs_xattr_user_handler; | 60 | extern struct xattr_handler reiserfs_xattr_user_handler; |
55 | extern struct xattr_handler reiserfs_xattr_trusted_handler; | 61 | extern struct xattr_handler reiserfs_xattr_trusted_handler; |
56 | extern struct xattr_handler reiserfs_xattr_security_handler; | 62 | extern struct xattr_handler reiserfs_xattr_security_handler; |
63 | #ifdef CONFIG_REISERFS_FS_SECURITY | ||
64 | int reiserfs_security_init(struct inode *dir, struct inode *inode, | ||
65 | struct reiserfs_security_handle *sec); | ||
66 | int reiserfs_security_write(struct reiserfs_transaction_handle *th, | ||
67 | struct inode *inode, | ||
68 | struct reiserfs_security_handle *sec); | ||
69 | void reiserfs_security_free(struct reiserfs_security_handle *sec); | ||
70 | #endif | ||
57 | 71 | ||
58 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) | 72 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) |
59 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) | 73 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) |
@@ -109,6 +123,24 @@ static inline void reiserfs_init_xattr_rwsem(struct inode *inode) | |||
109 | } | 123 | } |
110 | #endif /* CONFIG_REISERFS_FS_XATTR */ | 124 | #endif /* CONFIG_REISERFS_FS_XATTR */ |
111 | 125 | ||
126 | #ifndef CONFIG_REISERFS_FS_SECURITY | ||
127 | static inline int reiserfs_security_init(struct inode *dir, | ||
128 | struct inode *inode, | ||
129 | struct reiserfs_security_handle *sec) | ||
130 | { | ||
131 | return 0; | ||
132 | } | ||
133 | static inline int | ||
134 | reiserfs_security_write(struct reiserfs_transaction_handle *th, | ||
135 | struct inode *inode, | ||
136 | struct reiserfs_security_handle *sec) | ||
137 | { | ||
138 | return 0; | ||
139 | } | ||
140 | static inline void reiserfs_security_free(struct reiserfs_security_handle *sec) | ||
141 | {} | ||
142 | #endif | ||
143 | |||
112 | #endif /* __KERNEL__ */ | 144 | #endif /* __KERNEL__ */ |
113 | 145 | ||
114 | #endif /* _LINUX_REISERFS_XATTR_H */ | 146 | #endif /* _LINUX_REISERFS_XATTR_H */ |