diff options
author | Olof Johansson <olof@lixom.net> | 2012-09-05 18:35:48 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-09-05 18:35:48 -0400 |
commit | 1875962377574b4edb7b164001e3e341c25290d5 (patch) | |
tree | 374a5299403ec21e2d9a66a6548ce876a388b589 /fs/compat.c | |
parent | 5cbee140a28c2746449ae31e85738043ae4da927 (diff) | |
parent | c88a79a7789b2909ad1cf69ea2c9142030bbd6f4 (diff) |
Merge branch 'soc-core' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt
* 'soc-core' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
ARM: mach-shmobile: Add compilation support for dtbs using 'make dtbs'
+ sync to 3.6-rc3
Diffstat (limited to 'fs/compat.c')
-rw-r--r-- | fs/compat.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/compat.c b/fs/compat.c index 6161255fac45..1bdb350ea5d3 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -1155,11 +1155,14 @@ compat_sys_readv(unsigned long fd, const struct compat_iovec __user *vec, | |||
1155 | struct file *file; | 1155 | struct file *file; |
1156 | int fput_needed; | 1156 | int fput_needed; |
1157 | ssize_t ret; | 1157 | ssize_t ret; |
1158 | loff_t pos; | ||
1158 | 1159 | ||
1159 | file = fget_light(fd, &fput_needed); | 1160 | file = fget_light(fd, &fput_needed); |
1160 | if (!file) | 1161 | if (!file) |
1161 | return -EBADF; | 1162 | return -EBADF; |
1162 | ret = compat_readv(file, vec, vlen, &file->f_pos); | 1163 | pos = file->f_pos; |
1164 | ret = compat_readv(file, vec, vlen, &pos); | ||
1165 | file->f_pos = pos; | ||
1163 | fput_light(file, fput_needed); | 1166 | fput_light(file, fput_needed); |
1164 | return ret; | 1167 | return ret; |
1165 | } | 1168 | } |
@@ -1221,11 +1224,14 @@ compat_sys_writev(unsigned long fd, const struct compat_iovec __user *vec, | |||
1221 | struct file *file; | 1224 | struct file *file; |
1222 | int fput_needed; | 1225 | int fput_needed; |
1223 | ssize_t ret; | 1226 | ssize_t ret; |
1227 | loff_t pos; | ||
1224 | 1228 | ||
1225 | file = fget_light(fd, &fput_needed); | 1229 | file = fget_light(fd, &fput_needed); |
1226 | if (!file) | 1230 | if (!file) |
1227 | return -EBADF; | 1231 | return -EBADF; |
1228 | ret = compat_writev(file, vec, vlen, &file->f_pos); | 1232 | pos = file->f_pos; |
1233 | ret = compat_writev(file, vec, vlen, &pos); | ||
1234 | file->f_pos = pos; | ||
1229 | fput_light(file, fput_needed); | 1235 | fput_light(file, fput_needed); |
1230 | return ret; | 1236 | return ret; |
1231 | } | 1237 | } |