4 (C) 2001 Andreas Gruenbacher, <a.gruenbacher@computer.org>
7 #include <linux/posix_acl_xattr.h>
9 #define BCH_ACL_VERSION 0x0001
20 } bch_acl_entry_short;
26 static inline size_t bch2_acl_size(int count)
29 return sizeof(bch_acl_header) +
30 count * sizeof(bch_acl_entry_short);
32 return sizeof(bch_acl_header) +
33 4 * sizeof(bch_acl_entry_short) +
34 (count - 4) * sizeof(bch_acl_entry);
38 static inline int bch2_acl_count(size_t size)
42 size -= sizeof(bch_acl_header);
43 s = size - 4 * sizeof(bch_acl_entry_short);
45 if (size % sizeof(bch_acl_entry_short))
47 return size / sizeof(bch_acl_entry_short);
49 if (s % sizeof(bch_acl_entry))
51 return s / sizeof(bch_acl_entry) + 4;
55 extern struct posix_acl *bch2_get_acl(struct inode *, int);
56 extern int bch2_set_acl(struct inode *, struct posix_acl *, int);