2 * Copyright IBM Corporation, 2010
3 * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2.1 of the GNU Lesser General Public License
7 * as published by the Free Software Foundation.
9 * This program is distributed in the hope that it would be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 #ifndef __FS_EXT4_RICHACL_H
16 #define __FS_EXT4_RICHACL_H
18 #include <linux/richacl.h>
20 #ifdef CONFIG_EXT4_FS_RICHACL
22 # define EXT4_IS_RICHACL(inode) IS_RICHACL(inode)
24 /* Value for i_richacl if RICHACL has not been cached */
25 # define EXT4_RICHACL_NOT_CACHED ((void *)-1)
27 extern int ext4_permission(struct inode *, int);
28 extern int ext4_richacl_permission(struct inode *, unsigned int);
29 extern int ext4_may_create(struct inode *, int);
30 extern int ext4_may_delete(struct inode *, struct inode *, int);
31 extern int ext4_init_richacl(handle_t *, struct inode *, struct inode *);
32 extern int ext4_richacl_chmod(struct inode *);
34 #else /* CONFIG_FS_EXT4_RICHACL */
36 # define EXT4_IS_RICHACL(inode) (0)
38 # define ext4_permission NULL
39 # define ext4_may_create NULL
40 # define ext4_may_delete NULL
41 # define ext4_richacl_permission NULL
44 ext4_init_richacl(handle_t *handle, struct inode *inode, struct inode *dir)
50 ext4_richacl_chmod(struct inode *inode)
55 #endif /* CONFIG_FS_EXT4_RICHACL */
56 #endif /* __FS_EXT4_RICHACL_H */