]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ext4: Use simple_strtol() instead of simple_strtoul() in ext4_ui_proc_open
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 26 Nov 2008 07:23:19 +0000 (02:23 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 26 Nov 2008 07:23:19 +0000 (02:23 -0500)
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/super.c

index 81aed8b825a084cc9b5fdedcfdce17c52521b819..8a0ae883f567f7b86607d95377560faeb2fe615d 100644 (file)
@@ -3521,18 +3521,15 @@ static int ext4_ui_proc_open(struct inode *inode, struct file *file)
 static ssize_t ext4_ui_proc_write(struct file *file, const char __user *buf,
                               size_t cnt, loff_t *ppos)
 {
-       unsigned int *p = PDE(file->f_path.dentry->d_inode)->data;
+       unsigned long *p = PDE(file->f_path.dentry->d_inode)->data;
        char str[32];
-       unsigned long value;
 
        if (cnt >= sizeof(str))
                return -EINVAL;
        if (copy_from_user(str, buf, cnt))
                return -EFAULT;
-       value = simple_strtol(str, NULL, 0);
-       if (value < 0)
-               return -ERANGE;
-       *p = value;
+
+       *p = simple_strtoul(str, NULL, 0);
        return cnt;
 }