summaryrefslogtreecommitdiff
path: root/fs/bcachefs/io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-11-05 12:16:05 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:46 -0400
commitb735d73a00d5d9f5652a299146d518b7eea47b7b (patch)
tree498348ecf29adaada91d6b5b1784aea71f18d923 /fs/bcachefs/io.c
parentb5e8a6992fb1195cb58cb79461ef50f474c27608 (diff)
downloadlwn-b735d73a00d5d9f5652a299146d518b7eea47b7b.tar.gz
lwn-b735d73a00d5d9f5652a299146d518b7eea47b7b.zip
bcachefs: Build fixes for 32bit x86
PAGE_SIZE and size_t are not unsigned longs on 32 bit, annoying... also switch to atomic64_cmpxchg instead of cmpxchg() for journal_seq_copy, as atomic64_cmpxchg has a fallback that uses spinlocks for when it's not supported. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io.c')
-rw-r--r--fs/bcachefs/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c
index 346d77d68ade..6df99ac013a1 100644
--- a/fs/bcachefs/io.c
+++ b/fs/bcachefs/io.c
@@ -180,7 +180,7 @@ void bch2_bio_alloc_pages_pool(struct bch_fs *c, struct bio *bio,
while (size) {
struct page *page = __bio_alloc_page_pool(c, &using_mempool);
- unsigned len = min(PAGE_SIZE, size);
+ unsigned len = min_t(size_t, PAGE_SIZE, size);
BUG_ON(!bio_add_page(bio, page, len, 0));
size -= len;