summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/util.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-08-16 16:54:33 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:11 -0400
commit8e877caaad818595ecb6754355cea2058fd9848e (patch)
tree8097f33fb97c9de8ff0bd7dcf334b756f902bcd4 /fs/bcachefs/util.h
parente5570df295fc951546fec782bc087f72a47277e0 (diff)
downloadlinux-stable-8e877caaad818595ecb6754355cea2058fd9848e.tar.gz
linux-stable-8e877caaad818595ecb6754355cea2058fd9848e.tar.bz2
linux-stable-8e877caaad818595ecb6754355cea2058fd9848e.zip
bcachefs: Split out snapshot.c
subvolume.c has gotten a bit large, this splits out a separate file just for managing snapshot trees - BTREE_ID_snapshots. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/util.h')
-rw-r--r--fs/bcachefs/util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h
index 3cec6171c58f..d34423352f60 100644
--- a/fs/bcachefs/util.h
+++ b/fs/bcachefs/util.h
@@ -842,6 +842,11 @@ static inline int u8_cmp(u8 l, u8 r)
return cmp_int(l, r);
}
+static inline int cmp_le32(__le32 l, __le32 r)
+{
+ return cmp_int(le32_to_cpu(l), le32_to_cpu(r));
+}
+
#include <linux/uuid.h>
#endif /* _BCACHEFS_UTIL_H */