Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127930
b: refs/heads/master
c: 23475e2
h: refs/heads/master
v: v3
  • Loading branch information
Roel Kluin authored and Theodore Ts'o committed Nov 26, 2008
1 parent bbda98b commit 7215eee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 171bbfbeab7730031eec8025341401fabe540bd5
refs/heads/master: 23475e264c4f5c8b635a31924851287ead1ebe32
9 changes: 3 additions & 6 deletions trunk/fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7215eee

Please sign in to comment.