summaryrefslogtreecommitdiff
path: root/convert/source-ext2.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-08-22 20:34:36 +0200
committerDavid Sterba <dsterba@suse.com>2017-09-08 16:15:05 +0200
commitc05c70c77ca797549e45c971bc3c02bb3ec79e6e (patch)
tree7c387f6a3c311ef9da0380125d029efb6e0c04f2 /convert/source-ext2.c
parent385bbf35e245bfa71c83d6c41e563ce4ed22663e (diff)
btrfs-progs: convert: move acl helper to common source file
There were 2 copies of ext2_acl_count and acl_ea_size. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'convert/source-ext2.c')
-rw-r--r--convert/source-ext2.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/convert/source-ext2.c b/convert/source-ext2.c
index 24744e22..cdaf6698 100644
--- a/convert/source-ext2.c
+++ b/convert/source-ext2.c
@@ -424,27 +424,6 @@ static int ext2_xattr_check_entry(struct ext2_ext_attr_entry *entry,
return 0;
}
-static inline int ext2_acl_count(size_t size)
-{
- ssize_t s;
- size -= sizeof(ext2_acl_header);
- s = size - 4 * sizeof(ext2_acl_entry_short);
- if (s < 0) {
- if (size % sizeof(ext2_acl_entry_short))
- return -1;
- return size / sizeof(ext2_acl_entry_short);
- } else {
- if (s % sizeof(ext2_acl_entry))
- return -1;
- return s / sizeof(ext2_acl_entry) + 4;
- }
-}
-
-static inline size_t acl_ea_size(int count)
-{
- return sizeof(acl_ea_header) + count * sizeof(acl_ea_entry);
-}
-
static int ext2_acl_to_xattr(void *dst, const void *src,
size_t dst_size, size_t src_size)
{