Skip to content

Commit d361a56

Browse files
akpm00hnaz
authored andcommitted
mm-introduce-vm_lockonfault-checkpatch-fixes
WARNING: line over 80 characters torvalds#103: FILE: include/linux/mm.h:132: +#define VM_LOCKONFAULT 0x00001000 /* Lock the pages covered when they are faulted in */ WARNING: line over 80 characters torvalds#195: FILE: mm/hugetlb.c:3768: + unsigned long svm_flags = svma->vm_flags & ~(VM_LOCKED | VM_LOCKONFAULT); WARNING: line over 80 characters torvalds#231: FILE: mm/rmap.c:747: + pra->vm_flags |= (vma->vm_flags & (VM_LOCKED | VM_LOCKONFAULT)); WARNING: line over 80 characters torvalds#240: FILE: mm/rmap.c:768: + pra->vm_flags |= (vma->vm_flags & (VM_LOCKED | VM_LOCKONFAULT)); total: 0 errors, 4 warnings, 138 lines checked ./patches/mm-introduce-vm_lockonfault.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Eric B Munson <emunson@akamai.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent f95de70 commit d361a56

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

mm/hugetlb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3764,8 +3764,8 @@ static unsigned long page_table_shareable(struct vm_area_struct *svma,
37643764
unsigned long s_end = sbase + PUD_SIZE;
37653765

37663766
/* Allow segments to share if only one is marked locked */
3767-
unsigned long vm_flags = vma->vm_flags & ~(VM_LOCKED | VM_LOCKONFAULT);
3768-
unsigned long svm_flags = svma->vm_flags & ~(VM_LOCKED | VM_LOCKONFAULT);
3767+
unsigned long vm_flags = vma->vm_flags & ~(VM_LOCKED|VM_LOCKONFAULT);
3768+
unsigned long svm_flags = svma->vm_flags & ~(VM_LOCKED|VM_LOCKONFAULT);
37693769

37703770
/*
37713771
* match the virtual addresses, permission and the alignment of the

mm/rmap.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,8 @@ static int page_referenced_one(struct page *page, struct vm_area_struct *vma,
744744

745745
if (vma->vm_flags & VM_LOCKED) {
746746
spin_unlock(ptl);
747-
pra->vm_flags |= (vma->vm_flags & (VM_LOCKED | VM_LOCKONFAULT));
747+
pra->vm_flags |=
748+
(vma->vm_flags & (VM_LOCKED | VM_LOCKONFAULT));
748749
return SWAP_FAIL; /* To break the loop */
749750
}
750751

@@ -765,7 +766,8 @@ static int page_referenced_one(struct page *page, struct vm_area_struct *vma,
765766

766767
if (vma->vm_flags & VM_LOCKED) {
767768
pte_unmap_unlock(pte, ptl);
768-
pra->vm_flags |= (vma->vm_flags & (VM_LOCKED | VM_LOCKONFAULT));
769+
pra->vm_flags |=
770+
(vma->vm_flags & (VM_LOCKED | VM_LOCKONFAULT));
769771
return SWAP_FAIL; /* To break the loop */
770772
}
771773

0 commit comments

Comments
 (0)