X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=fs%2Fext4%2Facl.h;h=9d843d5deac402593b8b557e27c6ed25aafe401d;hb=38e712ab3d28d79725eaade02fe8aba51abac196;hp=0d1e6279cbfd5799a11f27f774fbcdaf8bd397fb;hpb=ac27a0ec112a089f1a5102bc8dffc79c8c815571;p=safe%2Fjmp%2Flinux-2.6 diff --git a/fs/ext4/acl.h b/fs/ext4/acl.h index 0d1e627..9d843d5 100644 --- a/fs/ext4/acl.h +++ b/fs/ext4/acl.h @@ -1,81 +1,77 @@ /* - File: fs/ext3/acl.h + File: fs/ext4/acl.h (C) 2001 Andreas Gruenbacher, */ #include -#define EXT3_ACL_VERSION 0x0001 +#define EXT4_ACL_VERSION 0x0001 typedef struct { __le16 e_tag; __le16 e_perm; __le32 e_id; -} ext3_acl_entry; +} ext4_acl_entry; typedef struct { __le16 e_tag; __le16 e_perm; -} ext3_acl_entry_short; +} ext4_acl_entry_short; typedef struct { __le32 a_version; -} ext3_acl_header; +} ext4_acl_header; -static inline size_t ext3_acl_size(int count) +static inline size_t ext4_acl_size(int count) { if (count <= 4) { - return sizeof(ext3_acl_header) + - count * sizeof(ext3_acl_entry_short); + return sizeof(ext4_acl_header) + + count * sizeof(ext4_acl_entry_short); } else { - return sizeof(ext3_acl_header) + - 4 * sizeof(ext3_acl_entry_short) + - (count - 4) * sizeof(ext3_acl_entry); + return sizeof(ext4_acl_header) + + 4 * sizeof(ext4_acl_entry_short) + + (count - 4) * sizeof(ext4_acl_entry); } } -static inline int ext3_acl_count(size_t size) +static inline int ext4_acl_count(size_t size) { ssize_t s; - size -= sizeof(ext3_acl_header); - s = size - 4 * sizeof(ext3_acl_entry_short); + size -= sizeof(ext4_acl_header); + s = size - 4 * sizeof(ext4_acl_entry_short); if (s < 0) { - if (size % sizeof(ext3_acl_entry_short)) + if (size % sizeof(ext4_acl_entry_short)) return -1; - return size / sizeof(ext3_acl_entry_short); + return size / sizeof(ext4_acl_entry_short); } else { - if (s % sizeof(ext3_acl_entry)) + if (s % sizeof(ext4_acl_entry)) return -1; - return s / sizeof(ext3_acl_entry) + 4; + return s / sizeof(ext4_acl_entry) + 4; } } -#ifdef CONFIG_EXT3_FS_POSIX_ACL - -/* Value for inode->u.ext3_i.i_acl and inode->u.ext3_i.i_default_acl - if the ACL has not been cached */ -#define EXT3_ACL_NOT_CACHED ((void *)-1) +#ifdef CONFIG_EXT4_FS_POSIX_ACL /* acl.c */ -extern int ext3_permission (struct inode *, int, struct nameidata *); -extern int ext3_acl_chmod (struct inode *); -extern int ext3_init_acl (handle_t *, struct inode *, struct inode *); +extern int ext4_check_acl(struct inode *, int); +extern int ext4_acl_chmod(struct inode *); +extern int ext4_init_acl(handle_t *, struct inode *, struct inode *); -#else /* CONFIG_EXT3_FS_POSIX_ACL */ +#else /* CONFIG_EXT4_FS_POSIX_ACL */ #include -#define ext3_permission NULL +#define ext4_check_acl NULL static inline int -ext3_acl_chmod(struct inode *inode) +ext4_acl_chmod(struct inode *inode) { return 0; } static inline int -ext3_init_acl(handle_t *handle, struct inode *inode, struct inode *dir) +ext4_init_acl(handle_t *handle, struct inode *inode, struct inode *dir) { return 0; } -#endif /* CONFIG_EXT3_FS_POSIX_ACL */ +#endif /* CONFIG_EXT4_FS_POSIX_ACL */