aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/super.c')
-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