mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] use correct wakeups in fs/pipe.c
Date: Sat, 19 Oct 2002 20:12:42 +0200	[thread overview]
Message-ID: <3DB1A09A.2070704@colorfullife.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 153 bytes --]

wake_up_interruptible() and _sync() calls are reversed in pipe_read().

The attached patches only calls _sync if a schedule() call follows.

--
	Manfred

[-- Attachment #2: patch-pipefix --]
[-- Type: text/plain, Size: 638 bytes --]

--- 2.5/fs/pipe.c	Sat Oct 19 11:40:14 2002
+++ build-2.5/fs/pipe.c	Sat Oct 19 19:44:04 2002
@@ -109,7 +109,7 @@
 			break;
 		}
 		if (do_wakeup) {
-			wake_up_interruptible(PIPE_WAIT(*inode));
+			wake_up_interruptible_sync(PIPE_WAIT(*inode));
  			kill_fasync(PIPE_FASYNC_WRITERS(*inode), SIGIO, POLL_OUT);
 		}
 		pipe_wait(inode);
@@ -117,7 +117,7 @@
 	up(PIPE_SEM(*inode));
 	/* Signal writers asynchronously that there is more room.  */
 	if (do_wakeup) {
-		wake_up_interruptible_sync(PIPE_WAIT(*inode));
+		wake_up_interruptible(PIPE_WAIT(*inode));
 		kill_fasync(PIPE_FASYNC_WRITERS(*inode), SIGIO, POLL_OUT);
 	}
 	if (ret > 0)

             reply	other threads:[~2002-10-19 18:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-19 18:12 Manfred Spraul [this message]
2002-10-20 11:28 ` Hanna Linder
2002-10-20 23:49   ` Davide Libenzi
2002-10-20 11:45     ` Hanna Linder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DB1A09A.2070704@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome