diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-11-24 03:12:22 -0500 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:47 -0400 |
| commit | e88a75ebe86c1df42f0ca9ab6e8fa50db26e7cef (patch) | |
| tree | 3b8608b0ae6e06d405bf6ef63e098416c68830db /fs/bcachefs/inode.c | |
| parent | bcachefs: New magic number (diff) | |
| download | linux-e88a75ebe86c1df42f0ca9ab6e8fa50db26e7cef.tar.gz linux-e88a75ebe86c1df42f0ca9ab6e8fa50db26e7cef.zip | |
bcachefs: New bpos_cmp(), bkey_cmp() replacements
This patch introduces
- bpos_eq()
- bpos_lt()
- bpos_le()
- bpos_gt()
- bpos_ge()
and equivalent replacements for bkey_cmp().
Looking at the generated assembly these could probably be improved
further, but we already see a significant code size improvement with
this patch.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/inode.c')
| -rw-r--r-- | fs/bcachefs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c index 827a0b04b00f..b4f09d77148d 100644 --- a/fs/bcachefs/inode.c +++ b/fs/bcachefs/inode.c @@ -543,7 +543,7 @@ int bch2_inode_create(struct btree_trans *trans, again: while ((k = bch2_btree_iter_peek(iter)).k && !(ret = bkey_err(k)) && - bkey_cmp(k.k->p, POS(0, max)) < 0) { + bkey_lt(k.k->p, POS(0, max))) { if (pos < iter->pos.offset) goto found_slot; |
