From 456f73c36e0776f8da9ded8f0977fbce417beca0 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Wed, 15 Oct 2025 17:58:40 -0400 Subject: [PATCH] Update bcachefs sources to 93477de251da bcachefs: Compatibility with v6.18 --- .bcachefs_revision | 2 +- libbcachefs/util/darray.c | 2 +- libbcachefs/util/util.h | 4 ++-- libbcachefs/vfs/direct.c | 4 ++-- libbcachefs/vfs/ioctl.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.bcachefs_revision b/.bcachefs_revision index 2ceb2a44..924efc55 100644 --- a/.bcachefs_revision +++ b/.bcachefs_revision @@ -1 +1 @@ -bb35ade3e8bb7af67734b746f416598002822df8 +93477de251da483c3fd9b16dca27363c1b44e73f diff --git a/libbcachefs/util/darray.c b/libbcachefs/util/darray.c index 7046711a..7afe40c5 100644 --- a/libbcachefs/util/darray.c +++ b/libbcachefs/util/darray.c @@ -24,7 +24,7 @@ int __bch2_darray_resize_noprof(darray_char *d, size_t element_size, size_t new_ return -ENOMEM; void *old = d->data; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,17,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,18,0) void *new = likely(bytes < INT_MAX) ? kvmalloc_noprof(bytes, gfp) : vmalloc_noprof(bytes); diff --git a/libbcachefs/util/util.h b/libbcachefs/util/util.h index 20ab2ece..05da1468 100644 --- a/libbcachefs/util/util.h +++ b/libbcachefs/util/util.h @@ -49,7 +49,7 @@ struct closure; (__builtin_types_compatible_p(typeof(_val), _type) || \ __builtin_types_compatible_p(typeof(_val), const _type)) -#if defined(__KERNEL__) && LINUX_VERSION_CODE <= KERNEL_VERSION(6,17,0) +#if defined(__KERNEL__) && LINUX_VERSION_CODE < KERNEL_VERSION(6,18,0) static inline struct bio_vec *bio_inline_vecs(struct bio *bio) { return (struct bio_vec *)(bio + 1); @@ -66,7 +66,7 @@ static inline size_t buf_pages(void *p, size_t len) static inline void *bch2_kvmalloc_noprof(size_t n, gfp_t flags) { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,17,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,18,0) void *p = unlikely(n >= INT_MAX) ? vmalloc_noprof(n) : kvmalloc_noprof(n, flags & ~__GFP_ZERO); diff --git a/libbcachefs/vfs/direct.c b/libbcachefs/vfs/direct.c index 4908fbcc..c6c4a37e 100644 --- a/libbcachefs/vfs/direct.c +++ b/libbcachefs/vfs/direct.c @@ -148,7 +148,7 @@ start: bio->bi_iter.bi_sector = offset >> 9; bio->bi_private = dio; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,17,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,18,0) ret = bio_iov_iter_get_pages(bio, iter); #else ret = bio_iov_iter_get_pages(bio, iter, 0); @@ -465,7 +465,7 @@ static __always_inline long bch2_dio_write_loop(struct dio_write *dio) EBUG_ON(current->faults_disabled_mapping); current->faults_disabled_mapping = mapping; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,17,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,18,0) ret = bio_iov_iter_get_pages(bio, &dio->iter); #else ret = bio_iov_iter_get_pages(bio, &dio->iter, 0); diff --git a/libbcachefs/vfs/ioctl.c b/libbcachefs/vfs/ioctl.c index 397d84d0..8931ae46 100644 --- a/libbcachefs/vfs/ioctl.c +++ b/libbcachefs/vfs/ioctl.c @@ -26,7 +26,7 @@ #define FSOP_GOING_FLAGS_LOGFLUSH 0x1 /* flush log but not data */ #define FSOP_GOING_FLAGS_NOLOGFLUSH 0x2 /* don't flush log nor data */ -#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,17,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,18,0) #define start_creating_user_path user_path_create #define end_creating_path done_path_create #define start_removing_user_path_at user_path_locked_at