From 90ee0828b417b4b28ca6e73d4ebb52456780343b Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Wed, 18 May 2022 17:21:16 -0600 Subject: [PATCH] EX-5248 ldiskfs: add __GFP_NOWARN to ext4_kvmalloc() Don't dump a stack trace if kmalloc() fails, since the whole point of these functions is retry with vmalloc() if normal kmalloc() fails. Lustre-change: https://review.whamcloud.com/47393 Lustre-commit: 9b15917634e8eb9d5ee29b1d497b389b8f452f9f Test-Parameters: trivial testlist=sanity-lsnapshot Signed-off-by: Andreas Dilger Change-Id: Id988bd84bd9bdffcb059405f1d471ef7213ebbe5 Reviewed-by: Li Dongyang Reviewed-on: https://review.whamcloud.com/47630 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Emoly Liu --- .../kernel_patches/patches/rhel7.7/ext4-misc.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ldiskfs/kernel_patches/patches/rhel7.7/ext4-misc.patch b/ldiskfs/kernel_patches/patches/rhel7.7/ext4-misc.patch index 065c814..609e0ea 100644 --- a/ldiskfs/kernel_patches/patches/rhel7.7/ext4-misc.patch +++ b/ldiskfs/kernel_patches/patches/rhel7.7/ext4-misc.patch @@ -128,3 +128,25 @@ Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/mballoc.c ext4_grpblk_t max = EXT4_CLUSTERS_PER_GROUP(sb); ext4_grpblk_t i = 0; ext4_grpblk_t first; +Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/mballoc.c +=================================================================== +--- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/super.c ++++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/super.c +@@ -161,7 +161,7 @@ void *ext4_kvmalloc(size_t size, gfp_t f + { + void *ret; + +- ret = kmalloc(size, flags); ++ ret = kmalloc(size, flags | __GFP_NOWARN); + if (!ret) + ret = __vmalloc(size, flags, PAGE_KERNEL); + return ret; +@@ -172,7 +172,7 @@ void *ext4_kvzalloc(size_t size, gfp_t f + { + void *ret; + +- ret = kzalloc(size, flags); ++ ret = kzalloc(size, flags | __GFP_NOWARN); + if (!ret) + ret = __vmalloc(size, flags | __GFP_ZERO, PAGE_KERNEL); + return ret; -- 1.8.3.1