diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-06-15 07:16:13 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-06-15 07:16:13 -0400 |
commit | 02676e5aee271c1f20d7d44249d26741aef1e846 (patch) | |
tree | 72394b5bfaba6b9637488a3d5aa82d7668531d95 /fs/splice.c | |
parent | 00de00bdad278783b3664ad2969954a707f5944a (diff) |
splice: only check do_wakeup in splice_to_pipe() for a real pipe
We only ever set do_wakeup to non-zero if the pipe has an inode
backing, so it's pointless to check outside the pipe->inode
check.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/splice.c')
-rw-r--r-- | fs/splice.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/splice.c b/fs/splice.c index 186fad463c43..e7d7080de2f9 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -245,14 +245,15 @@ static ssize_t splice_to_pipe(struct pipe_inode_info *pipe, | |||
245 | pipe->waiting_writers--; | 245 | pipe->waiting_writers--; |
246 | } | 246 | } |
247 | 247 | ||
248 | if (pipe->inode) | 248 | if (pipe->inode) { |
249 | mutex_unlock(&pipe->inode->i_mutex); | 249 | mutex_unlock(&pipe->inode->i_mutex); |
250 | 250 | ||
251 | if (do_wakeup) { | 251 | if (do_wakeup) { |
252 | smp_mb(); | 252 | smp_mb(); |
253 | if (waitqueue_active(&pipe->wait)) | 253 | if (waitqueue_active(&pipe->wait)) |
254 | wake_up_interruptible(&pipe->wait); | 254 | wake_up_interruptible(&pipe->wait); |
255 | kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); | 255 | kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); |
256 | } | ||
256 | } | 257 | } |
257 | 258 | ||
258 | while (page_nr < spd_pages) | 259 | while (page_nr < spd_pages) |