lkml.org 
[lkml]   [2007]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/1] replace 2.6.24-rc1 nfs_file_mmap by generic_file_mmap for nommu systems
Date
From
Use generic_file_mmap (which is noop in this case) instead of nfs_file_mmap
for nommu systems as suggested by Trond Myklebust.

Signed-Off-By: Enrik Berkhan <Enrik.Berkhan@ge.com>

---
fs/nfs/file.c | 8 ++++++++
1 files changed, 8 insertions(+)

Index: fs/nfs/file.c
===================================================================
--- fs/nfs/file.c.orig 2007-12-04 05:26:10.000000000 +0100
+++ fs/nfs/file.c 2007-12-12 08:15:16.000000000 +0100
@@ -41,7 +41,9 @@
static int nfs_file_open(struct inode *, struct file *);
static int nfs_file_release(struct inode *, struct file *);
static loff_t nfs_file_llseek(struct file *file, loff_t offset, int origin);
+#ifdef CONFIG_MMU
static int nfs_file_mmap(struct file *, struct vm_area_struct *);
+#endif
static ssize_t nfs_file_splice_read(struct file *filp, loff_t *ppos,
struct pipe_inode_info *pipe,
size_t count, unsigned int flags);
@@ -64,7 +66,11 @@ const struct file_operations nfs_file_op
.write = do_sync_write,
.aio_read = nfs_file_read,
.aio_write = nfs_file_write,
+#ifdef CONFIG_MMU
.mmap = nfs_file_mmap,
+#else
+ .mmap = generic_file_mmap,
+#endif
.open = nfs_file_open,
.flush = nfs_file_flush,
.release = nfs_file_release,
@@ -269,6 +275,7 @@ nfs_file_splice_read(struct file *filp,
return res;
}

+#ifdef CONFIG_MMU
static int
nfs_file_mmap(struct file * file, struct vm_area_struct * vma)
{
@@ -287,6 +294,7 @@ nfs_file_mmap(struct file * file, struct
}
return status;
}
+#endif

/*
* Flush any dirty pages for this process, and check for write errors.

\
 
 \ /
  Last update: 2007-12-12 08:31    [W:0.030 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site