This source file includes following definitions.
- jfs_init_security
1
2
3
4
5
6 #ifndef H_JFS_XATTR
7 #define H_JFS_XATTR
8
9 #include <linux/xattr.h>
10
11
12
13
14
15
16 struct jfs_ea {
17 u8 flag;
18 u8 namelen;
19 __le16 valuelen;
20 char name[0];
21 };
22
23 struct jfs_ea_list {
24 __le32 size;
25 struct jfs_ea ea[0];
26 };
27
28
29 #define MAXEASIZE 65535
30 #define MAXEALISTSIZE MAXEASIZE
31
32
33
34
35 #define EA_SIZE(ea) \
36 (sizeof (struct jfs_ea) + (ea)->namelen + 1 + \
37 le16_to_cpu((ea)->valuelen))
38 #define NEXT_EA(ea) ((struct jfs_ea *) (((char *) (ea)) + (EA_SIZE (ea))))
39 #define FIRST_EA(ealist) ((ealist)->ea)
40 #define EALIST_SIZE(ealist) le32_to_cpu((ealist)->size)
41 #define END_EALIST(ealist) \
42 ((struct jfs_ea *) (((char *) (ealist)) + EALIST_SIZE(ealist)))
43
44 extern int __jfs_setxattr(tid_t, struct inode *, const char *, const void *,
45 size_t, int);
46 extern ssize_t __jfs_getxattr(struct inode *, const char *, void *, size_t);
47 extern ssize_t jfs_listxattr(struct dentry *, char *, size_t);
48
49 extern const struct xattr_handler *jfs_xattr_handlers[];
50
51 #ifdef CONFIG_JFS_SECURITY
52 extern int jfs_init_security(tid_t, struct inode *, struct inode *,
53 const struct qstr *);
54 #else
55 static inline int jfs_init_security(tid_t tid, struct inode *inode,
56 struct inode *dir, const struct qstr *qstr)
57 {
58 return 0;
59 }
60 #endif
61
62 #endif