]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mmc: core: remove uselss memalloc_noio_save
authorOliver Neukum <oneukum@suse.com>
Mon, 22 Sep 2025 12:14:30 +0000 (14:14 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 21 Oct 2025 11:37:38 +0000 (13:37 +0200)
mmc_sd_num_wr_blocks() is in the block error path.
It needs to use GFP_NOIO. There is no need to complicate
anything here.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/block.c

index c0ffe0817fd4fde81a07d1b2e7ec4bf2f273b07e..73e171305d381563af5be61f34559880b1a2b9d0 100644 (file)
@@ -957,7 +957,6 @@ static int mmc_sd_num_wr_blocks(struct mmc_card *card, u32 *written_blocks)
        u32 result;
        __be32 *blocks;
        u8 resp_sz = mmc_card_ult_capacity(card) ? 8 : 4;
-       unsigned int noio_flag;
 
        struct mmc_request mrq = {};
        struct mmc_command cmd = {};
@@ -982,9 +981,7 @@ static int mmc_sd_num_wr_blocks(struct mmc_card *card, u32 *written_blocks)
        mrq.cmd = &cmd;
        mrq.data = &data;
 
-       noio_flag = memalloc_noio_save();
-       blocks = kmalloc(resp_sz, GFP_KERNEL);
-       memalloc_noio_restore(noio_flag);
+       blocks = kmalloc(resp_sz, GFP_NOIO);
        if (!blocks)
                return -ENOMEM;