Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=02676e5aee271c1f20d7d44249d26741aef1e846
Commit:     02676e5aee271c1f20d7d44249d26741aef1e846
Parent:     00de00bdad278783b3664ad2969954a707f5944a
Author:     Jens Axboe <[EMAIL PROTECTED]>
AuthorDate: Fri Jun 15 13:16:13 2007 +0200
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Fri Jun 15 13:16:13 2007 +0200

    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 <[EMAIL PROTECTED]>
---
 fs/splice.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/fs/splice.c b/fs/splice.c
index 186fad4..e7d7080 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -245,14 +245,15 @@ static ssize_t splice_to_pipe(struct pipe_inode_info 
*pipe,
                pipe->waiting_writers--;
        }
 
-       if (pipe->inode)
+       if (pipe->inode) {
                mutex_unlock(&pipe->inode->i_mutex);
 
-       if (do_wakeup) {
-               smp_mb();
-               if (waitqueue_active(&pipe->wait))
-                       wake_up_interruptible(&pipe->wait);
-               kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
+               if (do_wakeup) {
+                       smp_mb();
+                       if (waitqueue_active(&pipe->wait))
+                               wake_up_interruptible(&pipe->wait);
+                       kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
+               }
        }
 
        while (page_nr < spd_pages)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to