summaryrefslogtreecommitdiff
path: root/include/linux/posix_acl_xattr.h
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2016-09-27 14:03:22 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2016-09-28 04:52:00 +0300
commit2211d5ba5c6c4e972ba6dbc912b2897425ea6621 (patch)
tree2e74980ee6f475ea25560b098e367b1b5b7b8907 /include/linux/posix_acl_xattr.h
parentde04e76935ad5985d318fbce298a17e9dd2092b7 (diff)
downloadlinux-2211d5ba5c6c4e972ba6dbc912b2897425ea6621.tar.xz
posix_acl: xattr representation cleanups
Remove the unnecessary typedefs and the zero-length a_entries array in struct posix_acl_xattr_header. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/posix_acl_xattr.h')
-rw-r--r--include/linux/posix_acl_xattr.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/include/linux/posix_acl_xattr.h b/include/linux/posix_acl_xattr.h
index e5e8ec40278d..d23d36842322 100644
--- a/include/linux/posix_acl_xattr.h
+++ b/include/linux/posix_acl_xattr.h
@@ -18,34 +18,33 @@
/* An undefined entry e_id value */
#define ACL_UNDEFINED_ID (-1)
-typedef struct {
+struct posix_acl_xattr_entry {
__le16 e_tag;
__le16 e_perm;
__le32 e_id;
-} posix_acl_xattr_entry;
+};
-typedef struct {
+struct posix_acl_xattr_header {
__le32 a_version;
- posix_acl_xattr_entry a_entries[0];
-} posix_acl_xattr_header;
+};
static inline size_t
posix_acl_xattr_size(int count)
{
- return (sizeof(posix_acl_xattr_header) +
- (count * sizeof(posix_acl_xattr_entry)));
+ return (sizeof(struct posix_acl_xattr_header) +
+ (count * sizeof(struct posix_acl_xattr_entry)));
}
static inline int
posix_acl_xattr_count(size_t size)
{
- if (size < sizeof(posix_acl_xattr_header))
+ if (size < sizeof(struct posix_acl_xattr_header))
return -1;
- size -= sizeof(posix_acl_xattr_header);
- if (size % sizeof(posix_acl_xattr_entry))
+ size -= sizeof(struct posix_acl_xattr_header);
+ if (size % sizeof(struct posix_acl_xattr_entry))
return -1;
- return size / sizeof(posix_acl_xattr_entry);
+ return size / sizeof(struct posix_acl_xattr_entry);
}
#ifdef CONFIG_FS_POSIX_ACL