Skip to contentSkip to conversation

jrcu: bugfix: process all tokens

PATCH New Joe Korty 1 participant 1 message Mar 24, 2011

lore
Share & tools
lore

Joe Korty

author
#0 lore raw

PATCH 20/24 jrcu: bugfix: process all tokens

jrcu: process all tokens written to debugfs file rcudata, not just the first one.

kernel/jrcu.c +2 -2
Index: b/kernel/jrcu.c
===================================================================
@@ -659,6 +659,7 @@ static ssize_t rcu_debugfs_write(struct 
 	if (__get_user(c, &buffer[i++]))
 		return -EFAULT;
 
+next:
 	/* Token extractor -- first, skip leading whitepace */
 	while (c && isspace(c) && i < count) {
 		if (__get_user(c, &buffer[i++]))
@@ -693,8 +694,7 @@ static ssize_t rcu_debugfs_write(struct 
 		rcu_wdog_lim = wdog * USEC_PER_SEC;
 	} else
 		return -EINVAL;
-
-	return count;
+	goto next;
 }
 
 static int rcu_debugfs_open(struct inode *inode, struct file *file)