aboutsummaryrefslogtreecommitdiff
path: root/sound/oss/dmasound/dmasound_core.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2008-11-01 18:19:49 +0000
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-01 12:40:38 -0700
commit4b30fbde910dd40b831528e916cb8a91823f618f (patch)
tree1956131fa83e0d68f72de442501ffa3be65d86b9 /sound/oss/dmasound/dmasound_core.c
parent67d112842586aa11506b7a8afec29391bf8f3cca (diff)
oss: fix O_NONBLOCK in dmasound_core
We broke O_NONBLOCK handling in OSS dmasound_core in 2.3.11-pre3 - the original code copied f_flags to open_mode and then checked for O_NONBLOCK in there, but that got changed to copying f_mode and O_NONBLOCK has not reached that field in any kernel version. Since we do not care for any other bits, the fix is obvious... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound/oss/dmasound/dmasound_core.c')
-rw-r--r--sound/oss/dmasound/dmasound_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c
index b8239f3168f..793b7f47843 100644
--- a/sound/oss/dmasound/dmasound_core.c
+++ b/sound/oss/dmasound/dmasound_core.c
@@ -603,7 +603,7 @@ static ssize_t sq_write(struct file *file, const char __user *src, size_t uLeft,
while (uLeft) {
while (write_sq.count >= write_sq.max_active) {
sq_play();
- if (write_sq.open_mode & O_NONBLOCK)
+ if (write_sq.non_blocking)
return uWritten > 0 ? uWritten : -EAGAIN;
SLEEP(write_sq.action_queue);
if (signal_pending(current))
@@ -718,7 +718,7 @@ static int sq_open2(struct sound_queue *sq, struct file *file, fmode_t mode,
return rc;
}
- sq->open_mode = file->f_mode;
+ sq->non_blocking = file->f_flags & O_NONBLOCK;
}
return rc;
}