From: Andrew Morton <[email-masked]>

Cc: Carsten Otte <[email-masked]>

Signed-off-by: Andrew Morton <[email-masked]>
---

 fs/ext2/file.c     |    2 ++
 fs/ext2/xip.h      |   10 +++++-----
 include/linux/fs.h |    5 +++++
 ext2/inode.c       |    0 
 4 files changed, 12 insertions(+), 5 deletions(-)

diff -puN fs/ext2/file.c~xip-ext2-execute-in-place-3rd-version-fixes fs/ext2/file.c
--- 25/fs/ext2/file.c~xip-ext2-execute-in-place-3rd-version-fixes	2005-06-06 00:15:22.000000000 -0700
+++ 25-akpm/fs/ext2/file.c	2005-06-06 00:15:22.000000000 -0700
@@ -55,6 +55,7 @@ struct file_operations ext2_file_operati
 	.sendfile	= generic_file_sendfile,
 };
 
+#ifdef CONFIG_EXT2_FS_XIP
 struct file_operations ext2_xip_file_operations = {
 	.llseek		= generic_file_llseek,
 	.read		= do_sync_read,
@@ -70,6 +71,7 @@ struct file_operations ext2_xip_file_ope
 	.writev		= xip_file_writev,
 	.sendfile	= xip_file_sendfile,
 };
+#endif
 
 struct inode_operations ext2_file_inode_operations = {
 	.truncate	= ext2_truncate,
diff -puN fs/ext2/xip.h~xip-ext2-execute-in-place-3rd-version-fixes fs/ext2/xip.h
--- 25/fs/ext2/xip.h~xip-ext2-execute-in-place-3rd-version-fixes	2005-06-06 00:15:22.000000000 -0700
+++ 25-akpm/fs/ext2/xip.h	2005-06-06 00:15:22.000000000 -0700
@@ -17,9 +17,9 @@ static inline int ext2_use_xip (struct s
 struct page* ext2_get_xip_page (struct address_space *, sector_t, int);
 #define mapping_is_xip(map) unlikely(map->a_ops->get_xip_page)
 #else
-#define mapping_is_xip(map) 0
-#define ext2_xip_verify_sb(sb)              do { } while (0)
-#define ext2_use_xip(sb)	            0
-#define ext2_clear_xip_target(inode, chain) 0
-#define ext2_get_xip_page                   NULL
+#define mapping_is_xip(map)			0
+#define ext2_xip_verify_sb(sb)			do { } while (0)
+#define ext2_use_xip(sb)			0
+#define ext2_clear_xip_target(inode, chain)	0
+#define ext2_get_xip_page			NULL
 #endif
diff -puN include/linux/fs.h~xip-ext2-execute-in-place-3rd-version-fixes include/linux/fs.h
--- 25/include/linux/fs.h~xip-ext2-execute-in-place-3rd-version-fixes	2005-06-06 00:15:22.000000000 -0700
+++ 25-akpm/include/linux/fs.h	2005-06-06 00:15:22.000000000 -0700
@@ -1540,6 +1540,11 @@ extern ssize_t xip_file_aio_write(struct
 extern ssize_t xip_file_writev(struct file *file, const struct iovec *iov,
 			       unsigned long nr_segs, loff_t *ppos);
 extern int xip_truncate_page(struct address_space *mapping, loff_t from);
+#else
+static inline int xip_truncate_page(struct address_space *mapping, loff_t from)
+{
+	return 0;
+}
 #endif
 
 static inline void do_generic_file_read(struct file * filp, loff_t *ppos,
diff -puN fs/ext2/inode.c~xip-ext2-execute-in-place-3rd-version-fixes fs/ext2/inode.c
_