From patchwork Wed Jan 21 22:08:42 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1755 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033465; bh=kteDcQEeJAUztP64Uc+0t/H0UXAvA+xxOYjYvSk6qEE=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=WsAy0Mckdo9n9vXv5SQ44Rk8yX/mcTKg2mcFPE4WXaPIY9eDsIuM9T7w3EPh1K5L+ KRLwWLHPR2XPO74+L5474R269rTAkTNCW7ncNhXUNyznrKWwNMJOtlvAZm1OS9kEMA 2SSezUC5hBr+xXYsWNoXuyDT/HuuBgLCzVMekdLvCv1PEqtIoGH7vTimozobxtoaWN sm5hfYlDNExuLhI0KyTBmXBIYqDmT1IlhcuI6Pw3AxTwOcIGMRCfLq0hQS/M6GatW2 zqN0wu23T6q05URRcEjGP28jZY1Xtpe0ElgpkQPvBo/TYcUEwbQC2vxLoQxnsofqVc BuyvwNSuyKtaQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DE1C369605 for ; Wed, 21 Jan 2026 15:11:05 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id A22DjD-s-V1k for ; Wed, 21 Jan 2026 15:11:05 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033465; bh=kteDcQEeJAUztP64Uc+0t/H0UXAvA+xxOYjYvSk6qEE=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=WsAy0Mckdo9n9vXv5SQ44Rk8yX/mcTKg2mcFPE4WXaPIY9eDsIuM9T7w3EPh1K5L+ KRLwWLHPR2XPO74+L5474R269rTAkTNCW7ncNhXUNyznrKWwNMJOtlvAZm1OS9kEMA 2SSezUC5hBr+xXYsWNoXuyDT/HuuBgLCzVMekdLvCv1PEqtIoGH7vTimozobxtoaWN sm5hfYlDNExuLhI0KyTBmXBIYqDmT1IlhcuI6Pw3AxTwOcIGMRCfLq0hQS/M6GatW2 zqN0wu23T6q05URRcEjGP28jZY1Xtpe0ElgpkQPvBo/TYcUEwbQC2vxLoQxnsofqVc BuyvwNSuyKtaQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CB10F695FB for ; Wed, 21 Jan 2026 15:11:05 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033463; bh=NqH6NqYOOQql3rKKr1a4YrRXtzAVHGTOoTROwHzav0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gfN018968fIBv39Q37uDbFljZoMn6Na7X2yGQIbpIuGYUQy/wLIG/sSx3tC9z83NN tflXgIfgDpnR0P4ClLMx3Pjiv7MzHlAjoA/5wI6HMpnJ6SkoGfDjHZgVISaUxAgONB Ec8QVW1xY46BJK2RbWlrRYJWoyG6kHBdMNcmC+Mer04K0WnlcR//ohwMllJA9z7E5c jAQOZIdqhniJ4e10omnWEXsHOAQMRggmyoo4SGlAj/BRINTogqJH2xYaEXA/4OpkPU MZoSgtQWyK//ogipqcY5kCMxlcnAeTATxOrJ88X/+gvBiOfUJZErd9IOFs24AUaO1a ALZyq5+V6XgTQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CD112695F7; Wed, 21 Jan 2026 15:11:03 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id IT6vPC75dVQE; Wed, 21 Jan 2026 15:11:03 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033459; bh=ltx/uJftz6hyUDXFNwfEN64oEH1K2INVyP3W1qZwESE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FLUSzavHUWS8BCiqXnA/d34WbVgXsXJCsOmH6uTsc54ED9otFW/4mChlGAlrqnk2y xOdtLqmhktBZ8n/mHU6RMFuzc7rdy2X5S0fVLdyFib5LuWmQxwseWuj1/rvmORyTOZ bWlKFByruHVzJQ79Z5pFuWM1x8+d0rADsGvS3jXKZe6PScEw40ohc6AUmqQf4VEEFr BUGIOWTbBtL16mtvvH5wBKoe2MPdKaJrLOBXt2KCn+6Sbv8oJD/640tIGS+Y274gIn NrnZ6kg+Nx+DkqSMv0K5YquP5iYLhDIrnvQVy3O6QvtIaBO4CpbKnfb+33mUpAb5AU rMKcH+t3cLxRA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id DB494695FB; Wed, 21 Jan 2026 15:10:58 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 21 Jan 2026 15:08:42 -0700 Message-ID: <20260121220857.2137568-30-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260121220857.2137568-1-sjg@u-boot.org> References: <20260121220857.2137568-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: PGS4F6QB3G5575OXOYRSIWJCWD56R64Z X-Message-ID-Hash: PGS4F6QB3G5575OXOYRSIWJCWD56R64Z X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 29/33] ext4l: Move WHITEOUT and usercopy stubs to headers List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Move definitions to their canonical Linux kernel locations: - WHITEOUT_DEV and WHITEOUT_MODE to linux/fs.h - kmem_cache_create_usercopy() to linux/slab.h Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 7 ------- include/linux/fs.h | 4 ++++ include/linux/slab.h | 2 ++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 5c6a8711a9f..a7c7abf30b8 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -151,9 +151,6 @@ struct pipe_inode_info; struct kstat; struct path; -#define WHITEOUT_DEV 0 -#define WHITEOUT_MODE 0 - /* QSTR_INIT and dotdot_name are now in linux/dcache.h */ #include @@ -283,10 +280,6 @@ void trace_ext4_error(struct super_block *sb, const char *func, unsigned int lin /* DAX - declaration for stub.c */ void fs_put_dax(void *dax, void *holder); -/* slab usercopy - use regular kmem_cache_create */ -#define kmem_cache_create_usercopy(n, sz, al, fl, uo, us, c) \ - kmem_cache_create(n, sz, al, fl, c) - /* Memory allocation - declarations for stub.c */ void *kvzalloc(size_t size, gfp_t flags); #define kvmalloc(size, flags) kvzalloc(size, flags) diff --git a/include/linux/fs.h b/include/linux/fs.h index 2fa12a40aa7..69178235141 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -397,6 +397,10 @@ static inline void inode_init_once(struct inode *inode) #define RENAME_EXCHANGE (1 << 1) #define RENAME_WHITEOUT (1 << 2) +/* Whiteout device - used for overlayfs */ +#define WHITEOUT_DEV 0 +#define WHITEOUT_MODE 0 + /* Superblock flags */ #define SB_RDONLY (1 << 0) /* Read-only mount */ #define SB_POSIXACL (1 << 16) /* POSIX ACL support */ diff --git a/include/linux/slab.h b/include/linux/slab.h index 628126e0a3b..6722450a5cc 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -126,6 +126,8 @@ struct kmem_cache { struct kmem_cache *get_mem(int element_sz); #define kmem_cache_create(a, sz, c, d, e) ({ (void)(a); (void)(e); get_mem(sz); }) +#define kmem_cache_create_usercopy(n, sz, al, fl, uo, us, c) \ + kmem_cache_create(n, sz, al, fl, c) /** * KMEM_CACHE - shorthand for creating a named kmem_cache