aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2008-11-26 02:23:19 -0500
committerTheodore Ts'o <tytso@mit.edu>2008-11-26 02:23:19 -0500
commit23475e264c4f5c8b635a31924851287ead1ebe32 (patch)
tree9fd63f363dbea794235eac51b75402d3d0baa46b /fs
parent171bbfbeab7730031eec8025341401fabe540bd5 (diff)
ext4: Use simple_strtol() instead of simple_strtoul() in ext4_ui_proc_open
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/super.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 81aed8b825a0..8a0ae883f567 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3521,18 +3521,15 @@ static int ext4_ui_proc_open(struct inode *inode, struct file *file)
3521static ssize_t ext4_ui_proc_write(struct file *file, const char __user *buf, 3521static ssize_t ext4_ui_proc_write(struct file *file, const char __user *buf,
3522 size_t cnt, loff_t *ppos) 3522 size_t cnt, loff_t *ppos)
3523{ 3523{
3524 unsigned int *p = PDE(file->f_path.dentry->d_inode)->data; 3524 unsigned long *p = PDE(file->f_path.dentry->d_inode)->data;
3525 char str[32]; 3525 char str[32];
3526 unsigned long value;
3527 3526
3528 if (cnt >= sizeof(str)) 3527 if (cnt >= sizeof(str))
3529 return -EINVAL; 3528 return -EINVAL;
3530 if (copy_from_user(str, buf, cnt)) 3529 if (copy_from_user(str, buf, cnt))
3531 return -EFAULT; 3530 return -EFAULT;
3532 value = simple_strtol(str, NULL, 0); 3531
3533 if (value < 0) 3532 *p = simple_strtoul(str, NULL, 0);
3534 return -ERANGE;
3535 *p = value;
3536 return cnt; 3533 return cnt;
3537} 3534}
3538 3535