Skip to content

Commit

Permalink
mm-introduce-vm_lockonfault-checkpatch-fixes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
akpm00 authored and hnaz committed Jul 30, 2015
1 parent f95de70 commit d361a56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -3764,8 +3764,8 @@ static unsigned long page_table_shareable(struct vm_area_struct *svma,
unsigned long s_end = sbase + PUD_SIZE;

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

/*
* match the virtual addresses, permission and the alignment of the
Expand Down
6 changes: 4 additions & 2 deletions mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,8 @@ static int page_referenced_one(struct page *page, struct vm_area_struct *vma,

if (vma->vm_flags & VM_LOCKED) {
spin_unlock(ptl);
pra->vm_flags |= (vma->vm_flags & (VM_LOCKED | VM_LOCKONFAULT));
pra->vm_flags |=
(vma->vm_flags & (VM_LOCKED | VM_LOCKONFAULT));
return SWAP_FAIL; /* To break the loop */
}

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

if (vma->vm_flags & VM_LOCKED) {
pte_unmap_unlock(pte, ptl);
pra->vm_flags |= (vma->vm_flags & (VM_LOCKED | VM_LOCKONFAULT));
pra->vm_flags |=
(vma->vm_flags & (VM_LOCKED | VM_LOCKONFAULT));
return SWAP_FAIL; /* To break the loop */
}

Expand Down

0 comments on commit d361a56

Please sign in to comment.