Commit 02676e5a authored by Jens Axboe's avatar Jens Axboe

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: default avatarJens Axboe <jens.axboe@oracle.com>
parent 00de00bd
...@@ -245,7 +245,7 @@ static ssize_t splice_to_pipe(struct pipe_inode_info *pipe, ...@@ -245,7 +245,7 @@ static ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
pipe->waiting_writers--; pipe->waiting_writers--;
} }
if (pipe->inode) if (pipe->inode) {
mutex_unlock(&pipe->inode->i_mutex); mutex_unlock(&pipe->inode->i_mutex);
if (do_wakeup) { if (do_wakeup) {
...@@ -254,6 +254,7 @@ static ssize_t splice_to_pipe(struct pipe_inode_info *pipe, ...@@ -254,6 +254,7 @@ static ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
wake_up_interruptible(&pipe->wait); wake_up_interruptible(&pipe->wait);
kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
} }
}
while (page_nr < spd_pages) while (page_nr < spd_pages)
page_cache_release(spd->pages[page_nr++]); page_cache_release(spd->pages[page_nr++]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment