Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm: remove useless vma parameter to offset_il_node

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/1502899755-23146-1-git-send-email-ldufour@linux.vnet.ibm.com
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Laurent Dufour and committed by
Linus Torvalds
98c70baa de540a97

+3 -4
+3 -4
mm/mempolicy.c
··· 1745 1745 * node in pol->v.nodes (starting from n=0), wrapping around if n exceeds the 1746 1746 * number of present nodes. 1747 1747 */ 1748 - static unsigned offset_il_node(struct mempolicy *pol, 1749 - struct vm_area_struct *vma, unsigned long n) 1748 + static unsigned offset_il_node(struct mempolicy *pol, unsigned long n) 1750 1749 { 1751 1750 unsigned nnodes = nodes_weight(pol->v.nodes); 1752 1751 unsigned target; ··· 1778 1779 BUG_ON(shift < PAGE_SHIFT); 1779 1780 off = vma->vm_pgoff >> (shift - PAGE_SHIFT); 1780 1781 off += (addr - vma->vm_start) >> shift; 1781 - return offset_il_node(pol, vma, off); 1782 + return offset_il_node(pol, off); 1782 1783 } else 1783 1784 return interleave_nodes(pol); 1784 1785 } ··· 2246 2247 2247 2248 pgoff = vma->vm_pgoff; 2248 2249 pgoff += (addr - vma->vm_start) >> PAGE_SHIFT; 2249 - polnid = offset_il_node(pol, vma, pgoff); 2250 + polnid = offset_il_node(pol, pgoff); 2250 2251 break; 2251 2252 2252 2253 case MPOL_PREFERRED: