Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321823
b: refs/heads/master
c: 0e665d5
h: refs/heads/master
i:
  321821: 2743557
  321819: 1bae968
  321815: 5270dcc
  321807: 2513ced
  321791: 48e0096
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Aug 20, 2012
1 parent aaa9350 commit 08f8d65
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 90785be317dabdef6e9763e75e370991a6a46c91
refs/heads/master: 0e665d5d1125f9f4ccff56a75e814f10f88861a2
10 changes: 8 additions & 2 deletions trunk/fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1155,11 +1155,14 @@ compat_sys_readv(unsigned long fd, const struct compat_iovec __user *vec,
struct file *file;
int fput_needed;
ssize_t ret;
loff_t pos;

file = fget_light(fd, &fput_needed);
if (!file)
return -EBADF;
ret = compat_readv(file, vec, vlen, &file->f_pos);
pos = file->f_pos;
ret = compat_readv(file, vec, vlen, &pos);
file->f_pos = pos;
fput_light(file, fput_needed);
return ret;
}
Expand Down Expand Up @@ -1221,11 +1224,14 @@ compat_sys_writev(unsigned long fd, const struct compat_iovec __user *vec,
struct file *file;
int fput_needed;
ssize_t ret;
loff_t pos;

file = fget_light(fd, &fput_needed);
if (!file)
return -EBADF;
ret = compat_writev(file, vec, vlen, &file->f_pos);
pos = file->f_pos;
ret = compat_writev(file, vec, vlen, &pos);
file->f_pos = pos;
fput_light(file, fput_needed);
return ret;
}
Expand Down

0 comments on commit 08f8d65

Please sign in to comment.