]> err.no Git - linux-2.6/commitdiff
fix page release issue in filemap_fault
authorYan Zheng <yanzheng@21cn.com>
Mon, 8 Oct 2007 17:08:37 +0000 (10:08 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 8 Oct 2007 19:58:14 +0000 (12:58 -0700)
find_lock_page increases page's usage count, we should decrease it
before return VM_FAULT_SIGBUS

Signed-off-by: Yan Zheng<yanzheng@21cn.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/filemap.c

index 90b657b50f81413a8452313f8a7b225888971f7b..15c8413ee929200006e4eb5e8a96bf5b04f0f213 100644 (file)
@@ -1388,6 +1388,7 @@ retry_find:
        size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
        if (unlikely(vmf->pgoff >= size)) {
                unlock_page(page);
+               page_cache_release(page);
                goto outside_data_content;
        }