diff options
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index ea26d7a0342d..0e10b06fc7d6 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -756,7 +756,7 @@ void shmem_unlock_mapping(struct address_space *mapping) | |||
756 | break; | 756 | break; |
757 | index = indices[pvec.nr - 1] + 1; | 757 | index = indices[pvec.nr - 1] + 1; |
758 | pagevec_remove_exceptionals(&pvec); | 758 | pagevec_remove_exceptionals(&pvec); |
759 | check_move_unevictable_pages(pvec.pages, pvec.nr); | 759 | check_move_unevictable_pages(&pvec); |
760 | pagevec_release(&pvec); | 760 | pagevec_release(&pvec); |
761 | cond_resched(); | 761 | cond_resched(); |
762 | } | 762 | } |
@@ -2563,9 +2563,7 @@ static loff_t shmem_file_llseek(struct file *file, loff_t offset, int whence) | |||
2563 | inode_lock(inode); | 2563 | inode_lock(inode); |
2564 | /* We're holding i_mutex so we can access i_size directly */ | 2564 | /* We're holding i_mutex so we can access i_size directly */ |
2565 | 2565 | ||
2566 | if (offset < 0) | 2566 | if (offset < 0 || offset >= inode->i_size) |
2567 | offset = -EINVAL; | ||
2568 | else if (offset >= inode->i_size) | ||
2569 | offset = -ENXIO; | 2567 | offset = -ENXIO; |
2570 | else { | 2568 | else { |
2571 | start = offset >> PAGE_SHIFT; | 2569 | start = offset >> PAGE_SHIFT; |