}
if (do_wakeup) {
- wake_up_interruptible_sync(PIPE_WAIT(*inode));
+ smp_mb();
+ if (waitqueue_active(PIPE_WAIT(*inode)))
+ wake_up_interruptible_sync(PIPE_WAIT(*inode));
kill_fasync(PIPE_FASYNC_READERS(*inode), SIGIO,
POLL_IN);
do_wakeup = 0;
mutex_unlock(PIPE_MUTEX(*inode));
if (do_wakeup) {
- wake_up_interruptible(PIPE_WAIT(*inode));
+ smp_mb();
+ if (waitqueue_active(PIPE_WAIT(*inode)))
+ wake_up_interruptible(PIPE_WAIT(*inode));
kill_fasync(PIPE_FASYNC_READERS(*inode), SIGIO, POLL_IN);
}
}
if (do_wakeup) {
- wake_up_interruptible_sync(PIPE_WAIT(*inode));
+ smp_mb();
+ if (waitqueue_active(PIPE_WAIT(*inode)))
+ wake_up_interruptible_sync(PIPE_WAIT(*inode));
kill_fasync(PIPE_FASYNC_WRITERS(*inode),SIGIO,POLL_OUT);
do_wakeup = 0;
}
mutex_unlock(PIPE_MUTEX(*inode));
if (do_wakeup) {
- wake_up_interruptible(PIPE_WAIT(*inode));
+ smp_mb();
+ if (waitqueue_active(PIPE_WAIT(*inode)))
+ wake_up_interruptible(PIPE_WAIT(*inode));
kill_fasync(PIPE_FASYNC_WRITERS(*inode), SIGIO, POLL_OUT);
}