[PATCH] fix for cpusets minor problem

This patch fixes minor problem that the CPUSETS have when files in the
cpuset filesystem are read after lseek()-ed beyond the EOF.

Signed-off-by: KUROSAWA Takahiro <kurosawa@valinux.co.jp>
Acked-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 1f06e76..712d020 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -972,6 +972,10 @@
 	*s++ = '\n';
 	*s = '\0';
 
+	/* Do nothing if *ppos is at the eof or beyond the eof. */
+	if (s - page <= *ppos)
+		return 0;
+
 	start = page + *ppos;
 	n = s - start;
 	retval = n - copy_to_user(buf, start, min(n, nbytes));