blob: 9d9fb7cf093efeb8cf90e2e0dd6540a171d4d573 [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;
Matthew Wilcoxa3ac9732018-06-07 07:57:19 -070025 struct jffs2_acl_entry a_entries[];
KaiGai Koheide1f72f2006-05-13 15:13:27 +090026};
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090027
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090028#ifdef CONFIG_JFFS2_FS_POSIX_ACL
29
Miklos Szeredi0cad6242021-08-18 22:08:24 +020030struct posix_acl *jffs2_get_acl(struct inode *inode, int type, bool rcu);
Christian Brauner549c7292021-01-21 14:19:43 +010031int jffs2_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
32 struct posix_acl *acl, int type);
Al Virod3fb6122011-07-23 18:37:50 -040033extern int jffs2_init_acl_pre(struct inode *, struct inode *, umode_t *);
KaiGai Koheicfc8dc62007-09-14 15:16:35 +090034extern int jffs2_init_acl_post(struct inode *);
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090035
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090036#else
37
Christoph Hellwig4e34e712011-07-23 17:37:31 +020038#define jffs2_get_acl (NULL)
Christoph Hellwigf2963d42013-12-20 05:16:47 -080039#define jffs2_set_acl (NULL)
KaiGai Koheicfc8dc62007-09-14 15:16:35 +090040#define jffs2_init_acl_pre(dir_i,inode,mode) (0)
41#define jffs2_init_acl_post(inode) (0)
KaiGai Koheiaa98d7c2006-05-13 15:09:47 +090042
43#endif /* CONFIG_JFFS2_FS_POSIX_ACL */