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
23
24
25
26
27struct jfs_ea {
28 u8 flag;
29 u8 namelen;
30 __le16 valuelen;
31 char name[0];
32};
33
34struct jfs_ea_list {
35 __le32 size;
36 struct jfs_ea ea[0];
37};
38
39
40#define MAXEASIZE 65535
41#define MAXEALISTSIZE MAXEASIZE
42
43
44
45
46#define EA_SIZE(ea) \
47 (sizeof (struct jfs_ea) + (ea)->namelen + 1 + \
48 le16_to_cpu((ea)->valuelen))
49#define NEXT_EA(ea) ((struct jfs_ea *) (((char *) (ea)) + (EA_SIZE (ea))))
50#define FIRST_EA(ealist) ((ealist)->ea)
51#define EALIST_SIZE(ealist) le32_to_cpu((ealist)->size)
52#define END_EALIST(ealist) \
53 ((struct jfs_ea *) (((char *) (ealist)) + EALIST_SIZE(ealist)))
54
55extern int __jfs_setxattr(tid_t, struct inode *, const char *, const void *,
56 size_t, int);
57extern int jfs_setxattr(struct dentry *, const char *, const void *, size_t,
58 int);
59extern ssize_t __jfs_getxattr(struct inode *, const char *, void *, size_t);
60extern ssize_t jfs_getxattr(struct dentry *, const char *, void *, size_t);
61extern ssize_t jfs_listxattr(struct dentry *, char *, size_t);
62extern int jfs_removexattr(struct dentry *, const char *);
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