summaryrefslogtreecommitdiff
path: root/fs/bcachefs/inode.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-12-13 06:01:30 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:13 -0400
commita3e70fb287ee62ee14512a69e9a3e1870a057e11 (patch)
tree7a0e148e7d7f5528d78711c4b891c7da4cce1343 /fs/bcachefs/inode.h
parent7121643e4fe20cbf916bf7ff032873dfbc19ee8e (diff)
downloadlwn-a3e70fb287ee62ee14512a69e9a3e1870a057e11.tar.gz
lwn-a3e70fb287ee62ee14512a69e9a3e1870a057e11.zip
bcachefs: use x-macros more consistently
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/inode.h')
-rw-r--r--fs/bcachefs/inode.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/bcachefs/inode.h b/fs/bcachefs/inode.h
index 0bc852e69355..74fa6ff84111 100644
--- a/fs/bcachefs/inode.h
+++ b/fs/bcachefs/inode.h
@@ -30,17 +30,17 @@ struct bch_inode_unpacked {
u32 bi_flags;
u16 bi_mode;
-#define BCH_INODE_FIELD(_name, _bits) u##_bits _name;
+#define x(_name, _bits) u##_bits _name;
BCH_INODE_FIELDS()
-#undef BCH_INODE_FIELD
+#undef x
};
struct bkey_inode_buf {
struct bkey_i_inode inode;
-#define BCH_INODE_FIELD(_name, _bits) + 8 + _bits / 8
+#define x(_name, _bits) + 8 + _bits / 8
u8 _pad[0 + BCH_INODE_FIELDS()];
-#undef BCH_INODE_FIELD
+#undef x
} __attribute__((packed, aligned(8)));
void bch2_inode_pack(struct bkey_inode_buf *, const struct bch_inode_unpacked *);
@@ -65,11 +65,11 @@ static inline struct bch_io_opts bch2_inode_opts_get(struct bch_inode_unpacked *
{
struct bch_io_opts ret = { 0 };
-#define BCH_INODE_OPT(_name, _bits) \
+#define x(_name, _bits) \
if (inode->bi_##_name) \
opt_set(ret, _name, inode->bi_##_name - 1);
BCH_INODE_OPTS()
-#undef BCH_INODE_OPT
+#undef x
return ret;
}
@@ -77,12 +77,12 @@ static inline void __bch2_inode_opt_set(struct bch_inode_unpacked *inode,
enum bch_opt_id id, u64 v)
{
switch (id) {
-#define BCH_INODE_OPT(_name, ...) \
+#define x(_name, ...) \
case Opt_##_name: \
inode->bi_##_name = v; \
break;
BCH_INODE_OPTS()
-#undef BCH_INODE_OPT
+#undef x
default:
BUG();
}