GFP_NOWAIT allocation may fail anytime. It needs to be changed to 
GFP_NOIO. There's no need to handle an error because mempool_alloc with 
GFP_NOIO can't fail.

Signed-off-by: Mikulas Patocka <[email protected]>
Cc: [email protected]

---
 drivers/md/dm-verity-fec.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Index: linux-2.6/drivers/md/dm-verity-fec.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-verity-fec.c   2025-11-15 15:59:23.000000000 
+0100
+++ linux-2.6/drivers/md/dm-verity-fec.c        2025-11-15 16:01:23.000000000 
+0100
@@ -320,11 +320,7 @@ static int fec_alloc_bufs(struct dm_veri
                if (fio->bufs[n])
                        continue;
 
-               fio->bufs[n] = mempool_alloc(&v->fec->prealloc_pool, 
GFP_NOWAIT);
-               if (unlikely(!fio->bufs[n])) {
-                       DMERR("failed to allocate FEC buffer");
-                       return -ENOMEM;
-               }
+               fio->bufs[n] = mempool_alloc(&v->fec->prealloc_pool, GFP_NOIO);
        }
 
        /* try to allocate the maximum number of buffers */


Reply via email to