Merge tag 'spi-fix-v6.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
[platform/kernel/linux-starfive.git] / fs / xfs / xfs_extfree_item.h
index 186d0f2..da6a5af 100644 (file)
@@ -52,6 +52,14 @@ struct xfs_efi_log_item {
        xfs_efi_log_format_t    efi_format;
 };
 
+static inline size_t
+xfs_efi_log_item_sizeof(
+       unsigned int            nr)
+{
+       return offsetof(struct xfs_efi_log_item, efi_format) +
+                       xfs_efi_log_format_sizeof(nr);
+}
+
 /*
  * This is the "extent free done" log item.  It is used to log
  * the fact that some extents earlier mentioned in an efi item
@@ -64,6 +72,14 @@ struct xfs_efd_log_item {
        xfs_efd_log_format_t    efd_format;
 };
 
+static inline size_t
+xfs_efd_log_item_sizeof(
+       unsigned int            nr)
+{
+       return offsetof(struct xfs_efd_log_item, efd_format) +
+                       xfs_efd_log_format_sizeof(nr);
+}
+
 /*
  * Max number of extents in fast allocation path.
  */