]> git.baikalelectronics.ru Git - kernel.git/commit
calculation of pgoff in do_linear_fault() uses mixed units
authorDean Nelson <dcn@sgi.com>
Tue, 16 Oct 2007 08:24:45 +0000 (01:24 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 16 Oct 2007 16:42:53 +0000 (09:42 -0700)
commit8c54e03cb48039e0e464d3b8fbc77ee9b2c4d6a4
tree3d43edc4166667948415de84254bd60cfb457734
parent5b844a8f0044fa175b5cdd8125ebb928ef964e49
calculation of pgoff in do_linear_fault() uses mixed units

The calculation of pgoff in do_linear_fault() should use PAGE_SHIFT and not
PAGE_CACHE_SHIFT since vma->vm_pgoff is in units of PAGE_SIZE and not
PAGE_CACHE_SIZE.  At the moment linux/pagemap.h has PAGE_CACHE_SHIFT
defined as PAGE_SHIFT, but should that ever change this calculation would
break.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c