]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xfs: xfs_btree_bload_prep_block() should use __GFP_NOFAIL
authorDave Chinner <dchinner@redhat.com>
Tue, 27 Feb 2024 00:05:31 +0000 (11:05 +1100)
committerChandan Babu R <chandanbabu@kernel.org>
Wed, 28 Feb 2024 08:34:30 +0000 (14:04 +0530)
This was missed in the conversion from KM* flags.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Fixes: 10634530f7ba ("xfs: convert kmem_zalloc() to kzalloc()")
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
fs/xfs/libxfs/xfs_btree_staging.c

index d721719f759a8ad01a05b4e1b11e6c23ec2df1c1..6949297031529e37dcaa98b389d8f21526130f82 100644 (file)
@@ -303,7 +303,7 @@ xfs_btree_bload_prep_block(
 
                /* Allocate a new incore btree root block. */
                new_size = bbl->iroot_size(cur, level, nr_this_block, priv);
-               ifp->if_broot = kzalloc(new_size, GFP_KERNEL);
+               ifp->if_broot = kzalloc(new_size, GFP_KERNEL | __GFP_NOFAIL);
                ifp->if_broot_bytes = (int)new_size;
 
                /* Initialize it and send it out. */