Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200914
b: refs/heads/master
c: 19c9a49
h: refs/heads/master
v: v3
  • Loading branch information
Changli Gao authored and Jens Axboe committed Jun 30, 2010
1 parent b54c2cb commit 47df8a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 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: 2cb4b05e7647891b46b91c07c9a60304803d1688
refs/heads/master: 19c9a49b432f245c6293508d164a4350f1f2c601
6 changes: 2 additions & 4 deletions trunk/fs/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -1372,8 +1372,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
if (off_in)
return -ESPIPE;
if (off_out) {
if (!out->f_op || !out->f_op->llseek ||
out->f_op->llseek == no_llseek)
if (!(out->f_mode & FMODE_PWRITE))
return -EINVAL;
if (copy_from_user(&offset, off_out, sizeof(loff_t)))
return -EFAULT;
Expand All @@ -1393,8 +1392,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
if (off_out)
return -ESPIPE;
if (off_in) {
if (!in->f_op || !in->f_op->llseek ||
in->f_op->llseek == no_llseek)
if (!(in->f_mode & FMODE_PREAD))
return -EINVAL;
if (copy_from_user(&offset, off_in, sizeof(loff_t)))
return -EFAULT;
Expand Down

0 comments on commit 47df8a8

Please sign in to comment.