Whamcloud - gitweb
b=13868
authoryury <yury>
Sat, 13 Oct 2007 09:18:54 +0000 (09:18 +0000)
committeryury <yury>
Sat, 13 Oct 2007 09:18:54 +0000 (09:18 +0000)
r=adilger,nathan
- fixed handling user input in lprocfs_wr_lru_size().

lustre/ldlm/ldlm_resource.c

index 1980029..cf3b2b1 100644 (file)
@@ -168,7 +168,7 @@ static int lprocfs_wr_lru_size(struct file *file, const char *buffer,
         }
 
         tmp = simple_strtoul(dummy, &end, 0);
-        if (*end) {
+        if (dummy == end) {
                 CERROR("invalid value written\n");
                 return -EINVAL;
         }