Skip to content
/ linux Public

Commit 971658d

Browse files
josefbacikgregkh
authored andcommitted
btrfs: move btrfs_crc32c_final into free-space-cache.c
[ Upstream commit 102f264 ] 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> Stable-dep-of: 511dc89 ("btrfs: fix incorrect key offset in error message in check_dev_extent_item()") Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 37fc525 commit 971658d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

fs/btrfs/ctree.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -477,11 +477,6 @@ static inline u32 btrfs_crc32c(u32 crc, const void *address, unsigned length)
477477
return crc32c(crc, address, length);
478478
}
479479

480-
static inline void btrfs_crc32c_final(u32 crc, u8 *result)
481-
{
482-
put_unaligned_le32(~crc, result);
483-
}
484-
485480
static inline u64 btrfs_name_hash(const char *name, int len)
486481
{
487482
return crc32c((u32)~1, name, len);

fs/btrfs/free-space-cache.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ static void bitmap_clear_bits(struct btrfs_free_space_ctl *ctl,
5757
struct btrfs_free_space *info, u64 offset,
5858
u64 bytes, bool update_stats);
5959

60+
static void btrfs_crc32c_final(u32 crc, u8 *result)
61+
{
62+
put_unaligned_le32(~crc, result);
63+
}
64+
6065
static void __btrfs_remove_free_space_cache(struct btrfs_free_space_ctl *ctl)
6166
{
6267
struct btrfs_free_space *info;

0 commit comments

Comments
 (0)