Skip to contentSkip to conversation

mm/filemap.c: Use vmf_error()

PATCH In review Souptick Joarder 2 participants 2 messages Sep 27, 2018 – Oct 1, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/filemap.c: Use vmf_error()

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

---
 mm/filemap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
mm/filemap.c +1 -3
index 52517f2..7d04d7c 100644
@@ -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:
 	/*
Signature · 1 line
1.9.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Souptick Joarder

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

Looks good. You can add:

Honza

Quoted 22 lines
---
 mm/filemap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
mm/filemap.c +1 -3
index 52517f2..7d04d7c 100644
@@ -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:
 	/*
Signature · 1 line
1.9.1
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR