All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/filemap.c: Use vmf_error()
@ 2018-09-27 17:14 Souptick Joarder
  2018-10-01  9:51 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Souptick Joarder @ 2018-09-27 17:14 UTC (permalink / raw)
  To: willy, akpm, jack, mgorman, ak, jlayton; +Cc: linux-mm, linux-kernel

These codes can be replaced with new inline vmf_error().

Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
 mm/filemap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/filemap.c b/mm/filemap.c
index 52517f2..7d04d7c 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2581,9 +2581,7 @@ vm_fault_t filemap_fault(struct vm_fault *vmf)
 	 * system is low on memory, or a problem occurs while trying
 	 * to schedule I/O.
 	 */
-	if (error == -ENOMEM)
-		return VM_FAULT_OOM;
-	return VM_FAULT_SIGBUS;
+	return vmf_error(error);
 
 page_not_uptodate:
 	/*
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm/filemap.c: Use vmf_error()
  2018-09-27 17:14 [PATCH] mm/filemap.c: Use vmf_error() Souptick Joarder
@ 2018-10-01  9:51 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2018-10-01  9:51 UTC (permalink / raw)
  To: Souptick Joarder
  Cc: willy, akpm, jack, mgorman, ak, jlayton, linux-mm, linux-kernel

On Thu 27-09-18 22:44:12, Souptick Joarder wrote:
> These codes can be replaced with new inline vmf_error().
> 
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>

Looks good. You can add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  mm/filemap.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 52517f2..7d04d7c 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -2581,9 +2581,7 @@ vm_fault_t filemap_fault(struct vm_fault *vmf)
>  	 * system is low on memory, or a problem occurs while trying
>  	 * to schedule I/O.
>  	 */
> -	if (error == -ENOMEM)
> -		return VM_FAULT_OOM;
> -	return VM_FAULT_SIGBUS;
> +	return vmf_error(error);
>  
>  page_not_uptodate:
>  	/*
> -- 
> 1.9.1
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-01  9:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-27 17:14 [PATCH] mm/filemap.c: Use vmf_error() Souptick Joarder
2018-10-01  9:51 ` Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.