Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86717
b: refs/heads/master
c: 02cf01a
h: refs/heads/master
i:
  86715: ee5d655
v: v3
  • Loading branch information
Jens Axboe authored and Jens Axboe committed Mar 4, 2008
1 parent 160c5e0 commit 01b452c
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 5d87a052c7e5f245bbb3018721b4b0afe0afc252
refs/heads/master: 02cf01aea5af7a4d1a38045712fe11bffcc206b0
12 changes: 8 additions & 4 deletions trunk/fs/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -1669,6 +1669,13 @@ static int link_pipe(struct pipe_inode_info *ipipe,
i++;
} while (len);

/*
* return EAGAIN if we have the potential of some data in the
* future, otherwise just return 0
*/
if (!ret && ipipe->waiting_writers && (flags & SPLICE_F_NONBLOCK))
ret = -EAGAIN;

inode_double_unlock(ipipe->inode, opipe->inode);

/*
Expand Down Expand Up @@ -1709,11 +1716,8 @@ static long do_tee(struct file *in, struct file *out, size_t len,
ret = link_ipipe_prep(ipipe, flags);
if (!ret) {
ret = link_opipe_prep(opipe, flags);
if (!ret) {
if (!ret)
ret = link_pipe(ipipe, opipe, len, flags);
if (!ret && (flags & SPLICE_F_NONBLOCK))
ret = -EAGAIN;
}
}
}

Expand Down

0 comments on commit 01b452c

Please sign in to comment.