diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-05 10:11:11 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-05 10:11:11 -0700 |
commit | f9ba7179ce91fb77b2adf6eaab3676ab3a1f5a15 (patch) | |
tree | 2d02e7a4fd78083b78749d0c9c7466f0eb8e6f97 /fs/fuse/control.c | |
parent | 0b3e9f3f21c42d064f5f4088df4088e3d55755eb (diff) | |
parent | 203627bbc90377c509e32450c67c5d957ba2d989 (diff) | |
download | linux-stable-f9ba7179ce91fb77b2adf6eaab3676ab3a1f5a15.tar.gz linux-stable-f9ba7179ce91fb77b2adf6eaab3676ab3a1f5a15.tar.bz2 linux-stable-f9ba7179ce91fb77b2adf6eaab3676ab3a1f5a15.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse
Pull fuse updates from Miklos Szeredi.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
fuse: fix blksize calculation
fuse: fix stat call on 32 bit platforms
fuse: optimize fallocate on permanent failure
fuse: add FALLOCATE operation
fuse: Convert to kstrtoul_from_user
Diffstat (limited to 'fs/fuse/control.c')
-rw-r--r-- | fs/fuse/control.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/fuse/control.c b/fs/fuse/control.c index 42593c587d48..03ff5b1eba93 100644 --- a/fs/fuse/control.c +++ b/fs/fuse/control.c @@ -75,19 +75,13 @@ static ssize_t fuse_conn_limit_write(struct file *file, const char __user *buf, unsigned global_limit) { unsigned long t; - char tmp[32]; unsigned limit = (1 << 16) - 1; int err; - if (*ppos || count >= sizeof(tmp) - 1) - return -EINVAL; - - if (copy_from_user(tmp, buf, count)) + if (*ppos) return -EINVAL; - tmp[count] = '\0'; - - err = strict_strtoul(tmp, 0, &t); + err = kstrtoul_from_user(buf, count, 0, &t); if (err) return err; |