[PATCH 1/1] replace 2.6.24-rc1 nfs_file_mmap by generic_file_mmap for nommu systems

From: Berkhan, Enrik (GE Infra, Oil & Gas)
Date: Wed Dec 12 2007 - 02:28:14 EST


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@xxxxxx>

---
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/