[PATCH 2/4] fscrypto: Remove redundant __GFP_NOWARN

Qianfeng Rong posted 4 patches 2 months ago
[PATCH 2/4] fscrypto: Remove redundant __GFP_NOWARN
Posted by Qianfeng Rong 2 months ago
GFP_NOWAIT already includes __GFP_NOWARN, so let's remove
the redundant __GFP_NOWARN.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
---
 fs/crypto/bio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c
index 486fcb2ecf13..e92967e20e2a 100644
--- a/fs/crypto/bio.c
+++ b/fs/crypto/bio.c
@@ -148,7 +148,7 @@ int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk,
 	 */
 	for (i = 0; i < nr_pages; i++) {
 		pages[i] = fscrypt_alloc_bounce_page(i == 0 ? GFP_NOFS :
-						     GFP_NOWAIT | __GFP_NOWARN);
+						     GFP_NOWAIT);
 		if (!pages[i])
 			break;
 	}
-- 
2.34.1
Re: [PATCH 2/4] fscrypto: Remove redundant __GFP_NOWARN
Posted by Eric Biggers 1 month, 3 weeks ago
On Sun, Aug 03, 2025 at 06:22:40PM +0800, Qianfeng Rong wrote:
> GFP_NOWAIT already includes __GFP_NOWARN, so let's remove
> the redundant __GFP_NOWARN.
> 
> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
> ---
>  fs/crypto/bio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c
> index 486fcb2ecf13..e92967e20e2a 100644
> --- a/fs/crypto/bio.c
> +++ b/fs/crypto/bio.c
> @@ -148,7 +148,7 @@ int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk,
>  	 */
>  	for (i = 0; i < nr_pages; i++) {
>  		pages[i] = fscrypt_alloc_bounce_page(i == 0 ? GFP_NOFS :
> -						     GFP_NOWAIT | __GFP_NOWARN);
> +						     GFP_NOWAIT);
>  		if (!pages[i])
>  			break;
>  	}
> -- 
> 2.34.1
> 

Applied to https://git.kernel.org/pub/scm/fs/fscrypt/linux.git/log/?h=for-next

Thanks!

- Eric