Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165866
b: refs/heads/master
c: 05cc0ce
h: refs/heads/master
v: v3
  • Loading branch information
Wu Fengguang authored and Al Viro committed Sep 24, 2009
1 parent 0cfcca8 commit b06bf42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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: 7a62cc10215838286c747f86766063d5f01fcbd6
refs/heads/master: 05cc0cee6948fc11985d11557fb130645a7f69a6
5 changes: 3 additions & 2 deletions trunk/fs/libfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,10 +739,11 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf,
if (copy_from_user(attr->set_buf, buf, size))
goto out;

ret = len; /* claim we got the whole input */
attr->set_buf[size] = '\0';
val = simple_strtol(attr->set_buf, NULL, 0);
attr->set(attr->data, val);
ret = attr->set(attr->data, val);
if (ret == 0)
ret = len; /* on success, claim we got the whole input */
out:
mutex_unlock(&attr->mutex);
return ret;
Expand Down

0 comments on commit b06bf42

Please sign in to comment.