Skip to content

Commit

Permalink
mm: remove useless vma parameter to offset_il_node
Browse files Browse the repository at this point in the history
While reading the code I found that offset_il_node() has a vm_area_struct
pointer parameter which is unused.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Laurent Dufour <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Laurent Dufour authored and torvalds committed Sep 9, 2017
1 parent de540a9 commit 98c70ba
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1745,8 +1745,7 @@ unsigned int mempolicy_slab_node(void)
* node in pol->v.nodes (starting from n=0), wrapping around if n exceeds the
* number of present nodes.
*/
static unsigned offset_il_node(struct mempolicy *pol,
struct vm_area_struct *vma, unsigned long n)
static unsigned offset_il_node(struct mempolicy *pol, unsigned long n)
{
unsigned nnodes = nodes_weight(pol->v.nodes);
unsigned target;
Expand Down Expand Up @@ -1779,7 +1778,7 @@ static inline unsigned interleave_nid(struct mempolicy *pol,
BUG_ON(shift < PAGE_SHIFT);
off = vma->vm_pgoff >> (shift - PAGE_SHIFT);
off += (addr - vma->vm_start) >> shift;
return offset_il_node(pol, vma, off);
return offset_il_node(pol, off);
} else
return interleave_nodes(pol);
}
Expand Down Expand Up @@ -2247,7 +2246,7 @@ int mpol_misplaced(struct page *page, struct vm_area_struct *vma, unsigned long

pgoff = vma->vm_pgoff;
pgoff += (addr - vma->vm_start) >> PAGE_SHIFT;
polnid = offset_il_node(pol, vma, pgoff);
polnid = offset_il_node(pol, pgoff);
break;

case MPOL_PREFERRED:
Expand Down

0 comments on commit 98c70ba

Please sign in to comment.