[patch -mmotm 1/6] move memory_read_from_buffer() from fs.h to string.h

From: Akinobu Mita
Date: Sun Jul 13 2008 - 22:58:06 EST


James Bottomley warns that inclusion of linux/fs.h in a low level driver
was always a danger signal. This patch moves memory_read_from_buffer()
from fs.h to string.h and remove inclusion of linux/fs.h in existing
memory_read_from_buffer() user.

Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>
Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Cc: Zhang Rui <rui.zhang@xxxxxxxxx>
Cc: Bob Moore <robert.moore@xxxxxxxxx>
Cc: Thomas Renninger <trenn@xxxxxxx>
Cc: Len Brown <lenb@xxxxxxxxxx>
Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
Cc: linux390@xxxxxxxxxx
Cc: linux-s390@xxxxxxxxxxxxxxx
---
arch/s390/kernel/ipl.c | 1 -
drivers/zorro/zorro-sysfs.c | 1 -
include/linux/fs.h | 2 --
include/linux/string.h | 3 +++
4 files changed, 3 insertions(+), 4 deletions(-)

Index: 2.6-mmotm/include/linux/fs.h
===================================================================
--- 2.6-mmotm.orig/include/linux/fs.h
+++ 2.6-mmotm/include/linux/fs.h
@@ -2028,8 +2028,6 @@ extern void simple_release_fs(struct vfs

extern ssize_t simple_read_from_buffer(void __user *to, size_t count,
loff_t *ppos, const void *from, size_t available);
-extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,
- const void *from, size_t available);

#ifdef CONFIG_MIGRATION
extern int buffer_migrate_page(struct address_space *,
Index: 2.6-mmotm/include/linux/string.h
===================================================================
--- 2.6-mmotm.orig/include/linux/string.h
+++ 2.6-mmotm/include/linux/string.h
@@ -111,5 +111,8 @@ extern void argv_free(char **argv);

extern bool sysfs_streq(const char *s1, const char *s2);

+extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,
+ const void *from, size_t available);
+
#endif
#endif /* _LINUX_STRING_H_ */
Index: 2.6-mmotm/drivers/zorro/zorro-sysfs.c
===================================================================
--- 2.6-mmotm.orig/drivers/zorro/zorro-sysfs.c
+++ 2.6-mmotm/drivers/zorro/zorro-sysfs.c
@@ -15,7 +15,6 @@
#include <linux/zorro.h>
#include <linux/stat.h>
#include <linux/string.h>
-#include <linux/fs.h>

#include "zorro.h"

Index: 2.6-mmotm/arch/s390/kernel/ipl.c
===================================================================
--- 2.6-mmotm.orig/arch/s390/kernel/ipl.c
+++ 2.6-mmotm/arch/s390/kernel/ipl.c
@@ -14,7 +14,6 @@
#include <linux/delay.h>
#include <linux/reboot.h>
#include <linux/ctype.h>
-#include <linux/fs.h>
#include <asm/ipl.h>
#include <asm/smp.h>
#include <asm/setup.h>

--
--
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/