Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24.4 /mm/fremap.c

Filename:/mm/fremap.c
Lines Added:4
Lines Deleted:1
Also changed in: (Previous) 2.6.24.2  2.6.24-git22  2.6.24-git21  2.6.24-git20  2.6.24.1  2.6.24-git19 
(Following) 2.6.24.5  2.6.24.6  2.6.24.7  2.6.25-rc6-git8  2.6.25-rc7  2.6.25-rc8 

Location
[  2.6.24.4
  [  mm
     o  fremap.c

Patch

diff --git a/mm/fremap.c b/mm/fremap.c
index 14bd3bf..69a37c2 100644
--- a/mm/fremap.c
+++ b/mm/fremap.c
@@ -190,10 +190,13 @@ asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size,
        */
       if (mapping_cap_account_dirty(mapping)) {
          unsigned long addr;
+         struct file *file = vma->vm_file;
 
          flags &= MAP_NONBLOCK;
-         addr = mmap_region(vma->vm_file, start, size,
+         get_file(file);
+         addr = mmap_region(file, start, size,
                flags, vma->vm_flags, pgoff, 1);
+         fput(file);
          if (IS_ERR_VALUE(addr)) {
             err = addr;
          } else {


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.