* [PATCH] mmc: core: remove uselss memalloc_noio_save
@ 2025-09-22 12:14 Oliver Neukum
2025-09-23 15:00 ` Ulf Hansson
2025-10-17 13:30 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Oliver Neukum @ 2025-09-22 12:14 UTC (permalink / raw)
To: ulf.hansson, wsa+renesas, avri.altman, adrian.hunter, viro,
ansuelsmth, linux-mmc
Cc: Oliver Neukum
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.
Fixes: 869d37475788 ("mmc: core: Use GFP_NOIO in ACMD22")
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/mmc/core/block.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index 9cc47bf94804..766691d27a04 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -995,7 +995,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 = {};
@@ -1020,9 +1019,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;
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] mmc: core: remove uselss memalloc_noio_save
2025-09-22 12:14 [PATCH] mmc: core: remove uselss memalloc_noio_save Oliver Neukum
@ 2025-09-23 15:00 ` Ulf Hansson
2025-10-17 13:30 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2025-09-23 15:00 UTC (permalink / raw)
To: Oliver Neukum
Cc: wsa+renesas, avri.altman, adrian.hunter, viro, ansuelsmth,
linux-mmc
On Mon, 22 Sept 2025 at 14:14, Oliver Neukum <oneukum@suse.com> wrote:
>
> 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.
>
> Fixes: 869d37475788 ("mmc: core: Use GFP_NOIO in ACMD22")
Is this really something that should be considered as a fix? Is there
something broken or we are just cleaning up the code?
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> ---
> drivers/mmc/core/block.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
> index 9cc47bf94804..766691d27a04 100644
> --- a/drivers/mmc/core/block.c
> +++ b/drivers/mmc/core/block.c
> @@ -995,7 +995,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 = {};
> @@ -1020,9 +1019,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;
>
> --
> 2.51.0
>
Kind regards
Uffe
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] mmc: core: remove uselss memalloc_noio_save
2025-09-22 12:14 [PATCH] mmc: core: remove uselss memalloc_noio_save Oliver Neukum
2025-09-23 15:00 ` Ulf Hansson
@ 2025-10-17 13:30 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2025-10-17 13:30 UTC (permalink / raw)
To: Oliver Neukum
Cc: wsa+renesas, avri.altman, adrian.hunter, viro, ansuelsmth,
linux-mmc
On Mon, 22 Sept 2025 at 14:14, Oliver Neukum <oneukum@suse.com> wrote:
>
> 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.
>
> Fixes: 869d37475788 ("mmc: core: Use GFP_NOIO in ACMD22")
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
Applied for next and I also decided to drop the fixes tag, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/core/block.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
> index 9cc47bf94804..766691d27a04 100644
> --- a/drivers/mmc/core/block.c
> +++ b/drivers/mmc/core/block.c
> @@ -995,7 +995,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 = {};
> @@ -1020,9 +1019,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;
>
> --
> 2.51.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-17 13:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-22 12:14 [PATCH] mmc: core: remove uselss memalloc_noio_save Oliver Neukum
2025-09-23 15:00 ` Ulf Hansson
2025-10-17 13:30 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox