[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1239674662-31318-2-git-send-email-tj@kernel.org>
Date: Tue, 14 Apr 2009 11:04:18 +0900
From: Tejun Heo <tj@...nel.org>
To: linux-kernel@...r.kernel.org, fuse-devel@...ts.sourceforge.net,
miklos@...redi.hu, akpm@...ux-foundation.org, npiggin@...e.de
Cc: Tejun Heo <tj@...nel.org>
Subject: [PATCH 1/5] mmap: don't assume f_op->mmap() doesn't change vma->vm_file
mmap_region() assumes that vma->vm_file isn't changed by f_op->mmap()
and continues to use cache file after f_op->mmap() returns. Don't
assume that. This will be used by FUSE to redirect mmap to
shmem_file.
Signed-off-by: Tejun Heo <tj@...nel.org>
Cc: Nick Piggin <npiggin@...e.de>
---
mm/mmap.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index 4a38411..46a7ae5 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1194,6 +1194,7 @@ munmap_back:
vma->vm_file = file;
get_file(file);
error = file->f_op->mmap(file, vma);
+ file = vma->vm_file;
if (error)
goto unmap_and_free_vma;
if (vm_flags & VM_EXECUTABLE)
--
1.6.0.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists