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