blob: 8ca058aed3840fa5f8c13c5b733127c473899739 [file] [log] [blame]
KaiGai Kohei652ecc22006-05-13 15:18:27 +09001/*
2 * JFFS2 -- Journalling Flash File System, Version 2.
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +09003 *
David Woodhousec00c3102007-04-25 14:16:47 +01004 * Copyright © 2006 NEC Corporation
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +09005 *
KaiGai Kohei652ecc22006-05-13 15:18:27 +09006 * Created by KaiGai Kohei <kaigai@ak.jp.nec.com>
7 *
8 * For licensing information, see the file 'LICENCE' in this directory.
9 *
10 */
David Woodhousec00c3102007-04-25 14:16:47 +010011
KaiGai Koheide1f72f2006-05-13 15:13:27 +090012struct jffs2_acl_entry {
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090013 jint16_t e_tag;
14 jint16_t e_perm;
15 jint32_t e_id;
KaiGai Koheide1f72f2006-05-13 15:13:27 +090016};
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090017
KaiGai Koheide1f72f2006-05-13 15:13:27 +090018struct jffs2_acl_entry_short {
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090019 jint16_t e_tag;
20 jint16_t e_perm;
KaiGai Koheide1f72f2006-05-13 15:13:27 +090021};
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090022
KaiGai Koheide1f72f2006-05-13 15:13:27 +090023struct jffs2_acl_header {
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090024 jint32_t a_version;
KaiGai Koheide1f72f2006-05-13 15:13:27 +090025};
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090026
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090027#ifdef CONFIG_JFFS2_FS_POSIX_ACL
28
29#define JFFS2_ACL_NOT_CACHED ((void *)-1)
30
Al Viroe6305c42008-07-15 21:03:57 -040031extern int jffs2_permission(struct inode *, int);
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090032extern int jffs2_acl_chmod(struct inode *);
KaiGai Koheicfc8dc62007-09-14 15:16:35 +090033extern int jffs2_init_acl_pre(struct inode *, struct inode *, int *);
34extern int jffs2_init_acl_post(struct inode *);
KaiGai Koheic7afb0f2006-07-02 15:13:46 +010035extern void jffs2_clear_acl(struct jffs2_inode_info *);
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090036
37extern struct xattr_handler jffs2_acl_access_xattr_handler;
38extern struct xattr_handler jffs2_acl_default_xattr_handler;
39
40#else
41
KaiGai Koheicfc8dc62007-09-14 15:16:35 +090042#define jffs2_permission (NULL)
43#define jffs2_acl_chmod(inode) (0)
44#define jffs2_init_acl_pre(dir_i,inode,mode) (0)
45#define jffs2_init_acl_post(inode) (0)
KaiGai Koheic7afb0f2006-07-02 15:13:46 +010046#define jffs2_clear_acl(f)
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090047
48#endif /* CONFIG_JFFS2_FS_POSIX_ACL */