From: Simon Glass <simon.glass@canonical.com> Move the rwsem_is_locked() stub macro to linux/rwsem.h where it belongs with other rwsem operations. This reduces duplication in ext4_uboot.h and places the definition with related rwsem functions. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- fs/ext4l/ext4_uboot.h | 3 +-- include/linux/rwsem.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index aae248a6930..58479ccb2fe 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -758,8 +758,7 @@ static inline unsigned long memweight(const void *ptr, size_t bytes) /* extents.c stubs */ -/* rwsem is_locked stub */ -#define rwsem_is_locked(sem) (1) +/* rwsem_is_locked is in linux/rwsem.h */ /* Buffer operations */ #define sb_getblk_gfp(sb, blk, gfp) sb_getblk((sb), (blk)) diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index ea70829d135..7beaf5062ed 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h @@ -24,5 +24,6 @@ struct rw_semaphore { #define down_write_trylock(sem) 1 #define up_write(sem) do { } while (0) #define downgrade_write(sem) do { } while (0) +#define rwsem_is_locked(sem) (1) #endif /* _LINUX_RWSEM_H */ -- 2.43.0