Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234099
b: refs/heads/master
c: c44ed96
h: refs/heads/master
i:
  234097: e37b52c
  234095: ae55611
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Mar 13, 2011
1 parent 6a87cfe commit e5af757
Show file tree
Hide file tree
Showing 2 changed files with 7 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: c9a816c0ecb8cef8e6573a8eab47fc48c765e0a1
refs/heads/master: c44ed965be7a84afaa07543c04eb97a5dfe93422
8 changes: 6 additions & 2 deletions trunk/fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,9 @@ compat_sys_preadv(unsigned long fd, const struct compat_iovec __user *vec,
file = fget_light(fd, &fput_needed);
if (!file)
return -EBADF;
ret = compat_readv(file, vec, vlen, &pos);
ret = -ESPIPE;
if (file->f_mode & FMODE_PREAD)
ret = compat_readv(file, vec, vlen, &pos);
fput_light(file, fput_needed);
return ret;
}
Expand Down Expand Up @@ -1285,7 +1287,9 @@ compat_sys_pwritev(unsigned long fd, const struct compat_iovec __user *vec,
file = fget_light(fd, &fput_needed);
if (!file)
return -EBADF;
ret = compat_writev(file, vec, vlen, &pos);
ret = -ESPIPE;
if (file->f_mode & FMODE_PWRITE)
ret = compat_writev(file, vec, vlen, &pos);
fput_light(file, fput_needed);
return ret;
}
Expand Down

0 comments on commit e5af757

Please sign in to comment.