]> xenbits.xensource.com Git - people/pauldu/linux.git/commitdiff
btrfs: move btrfs_crc32c_final into free-space-cache.c
authorJosef Bacik <josef@toxicpanda.com>
Fri, 25 Aug 2023 20:19:19 +0000 (16:19 -0400)
committerDavid Sterba <dsterba@suse.com>
Thu, 12 Oct 2023 14:44:02 +0000 (16:44 +0200)
This is the only place this helper is used, take it out of ctree.h and
move it into free-space-cache.c.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/free-space-cache.c

index 9419f4e37a58c3d20164d4f6bf9fb447792e45c2..c80d9879d93135cf1597e3bc0045dacda9535ffa 100644 (file)
@@ -475,11 +475,6 @@ static inline u32 btrfs_crc32c(u32 crc, const void *address, unsigned length)
        return crc32c(crc, address, length);
 }
 
-static inline void btrfs_crc32c_final(u32 crc, u8 *result)
-{
-       put_unaligned_le32(~crc, result);
-}
-
 static inline u64 btrfs_name_hash(const char *name, int len)
 {
        return crc32c((u32)~1, name, len);
index 27fad70451aad754a2d0b10367b39fc5a53efe15..a4e023a9383db8b76dc1abee240fb878720a78f6 100644 (file)
@@ -57,6 +57,11 @@ static void bitmap_clear_bits(struct btrfs_free_space_ctl *ctl,
                              struct btrfs_free_space *info, u64 offset,
                              u64 bytes, bool update_stats);
 
+static void btrfs_crc32c_final(u32 crc, u8 *result)
+{
+       put_unaligned_le32(~crc, result);
+}
+
 static void __btrfs_remove_free_space_cache(struct btrfs_free_space_ctl *ctl)
 {
        struct btrfs_free_space *info;