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>

authored by Al Viro and committed by Linus Torvalds 4b30fbde 67d11284

+3 -3
+1 -1
sound/oss/dmasound/dmasound.h
··· 235 235 */ 236 236 int active; 237 237 wait_queue_head_t action_queue, open_queue, sync_queue; 238 - fmode_t open_mode; 238 + int non_blocking; 239 239 int busy, syncing, xruns, died; 240 240 }; 241 241
+2 -2
sound/oss/dmasound/dmasound_core.c
··· 603 603 while (uLeft) { 604 604 while (write_sq.count >= write_sq.max_active) { 605 605 sq_play(); 606 - if (write_sq.open_mode & O_NONBLOCK) 606 + if (write_sq.non_blocking) 607 607 return uWritten > 0 ? uWritten : -EAGAIN; 608 608 SLEEP(write_sq.action_queue); 609 609 if (signal_pending(current)) ··· 718 718 return rc; 719 719 } 720 720 721 - sq->open_mode = file->f_mode; 721 + sq->non_blocking = file->f_flags & O_NONBLOCK; 722 722 } 723 723 return rc; 724 724 }