diff options
Diffstat (limited to 'mm/fremap.c')
-rw-r--r-- | mm/fremap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/fremap.c b/mm/fremap.c index 9ed4fd432467..048659c0c03d 100644 --- a/mm/fremap.c +++ b/mm/fremap.c | |||
@@ -195,10 +195,9 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, | |||
195 | */ | 195 | */ |
196 | if (mapping_cap_account_dirty(mapping)) { | 196 | if (mapping_cap_account_dirty(mapping)) { |
197 | unsigned long addr; | 197 | unsigned long addr; |
198 | struct file *file = vma->vm_file; | 198 | struct file *file = get_file(vma->vm_file); |
199 | 199 | ||
200 | flags &= MAP_NONBLOCK; | 200 | flags &= MAP_NONBLOCK; |
201 | get_file(file); | ||
202 | addr = mmap_region(file, start, size, | 201 | addr = mmap_region(file, start, size, |
203 | flags, vma->vm_flags, pgoff); | 202 | flags, vma->vm_flags, pgoff); |
204 | fput(file); | 203 | fput(file); |