diff options
author | Yan Zheng <yanzheng@21cn.com> | 2007-10-08 13:08:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-08 15:58:14 -0400 |
commit | 745ad48e8cac47beec0b2f72dc3c64424bce1fec (patch) | |
tree | a16a8eedb7d6e27eaba86fd0cca8ea7bfd0cdcd8 /mm | |
parent | dd204d63cd11509081b41d7ab305fdc173382039 (diff) |
fix page release issue in filemap_fault
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/filemap.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 90b657b50f81..15c8413ee929 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1388,6 +1388,7 @@ retry_find: | |||
1388 | size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; | 1388 | size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; |
1389 | if (unlikely(vmf->pgoff >= size)) { | 1389 | if (unlikely(vmf->pgoff >= size)) { |
1390 | unlock_page(page); | 1390 | unlock_page(page); |
1391 | page_cache_release(page); | ||
1391 | goto outside_data_content; | 1392 | goto outside_data_content; |
1392 | } | 1393 | } |
1393 | 1394 | ||