Skip to contentSkip to conversation

mm-optimizing-error-condition-detection-in-do_mprotect_pkey.patch removed from -mm tree

merged [email protected] 1 participant 1 message Feb 25, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/mprotect.c: optimize error detection in do_mprotect_pkey()
has been removed from the -mm tree. Its filename was
mm-optimizing-error-condition-detection-in-do_mprotect_pkey.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Tianjia Zhang <[email protected]>
Subject: mm/mprotect.c: optimize error detection in do_mprotect_pkey()

Obviously, the error variable detection of the if statement is for the mprotect callback function, so it is also put into the scope of calling callbck.

This is a cleanup which makes this site consistent with the rest of this function's error handling.

---

 mm/mprotect.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
mm/mprotect.c renamed from mm/mprotect.c~mm-optimizing-error-condition-detection-in-do_mprotect_pkey +4 -3
@@ -617,10 +617,11 @@ static int do_mprotect_pkey(unsigned lon
 		if (tmp > end)
 			tmp = end;
 
-		if (vma->vm_ops && vma->vm_ops->mprotect)
+		if (vma->vm_ops && vma->vm_ops->mprotect) {
 			error = vma->vm_ops->mprotect(vma, nstart, tmp, newflags);
-		if (error)
-			goto out;
+			if (error)
+				goto out;
+		}
 
 		error = mprotect_fixup(vma, &prev, nstart, tmp, newflags);
 		if (error)

_

Patches currently in -mm which might be from [email protected] are