diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-06-23 19:40:43 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-07-02 17:06:28 -0400 |
commit | 2db9f0a35a4e4ad7cee756a4e0dabb7c1c8b6c72 (patch) | |
tree | 32dd2d06d650305c6bff129a92545c73d6bc9295 /sound | |
parent | 70b028b7ea94f1b36c61f3ee1c921cc3a87812e6 (diff) |
snd/PCM: fasync BKL pushdown
Chances are this is unneeded, but the code is twisty enough that it is hard
to tell.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/pcm_native.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 61f5d425b630..c49b9d9e303c 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/file.h> | 23 | #include <linux/file.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/smp_lock.h> | ||
25 | #include <linux/time.h> | 26 | #include <linux/time.h> |
26 | #include <linux/pm_qos_params.h> | 27 | #include <linux/pm_qos_params.h> |
27 | #include <linux/uio.h> | 28 | #include <linux/uio.h> |
@@ -3249,14 +3250,17 @@ static int snd_pcm_fasync(int fd, struct file * file, int on) | |||
3249 | struct snd_pcm_file * pcm_file; | 3250 | struct snd_pcm_file * pcm_file; |
3250 | struct snd_pcm_substream *substream; | 3251 | struct snd_pcm_substream *substream; |
3251 | struct snd_pcm_runtime *runtime; | 3252 | struct snd_pcm_runtime *runtime; |
3252 | int err; | 3253 | int err = -ENXIO; |
3253 | 3254 | ||
3255 | lock_kernel(); | ||
3254 | pcm_file = file->private_data; | 3256 | pcm_file = file->private_data; |
3255 | substream = pcm_file->substream; | 3257 | substream = pcm_file->substream; |
3256 | snd_assert(substream != NULL, return -ENXIO); | 3258 | snd_assert(substream != NULL, goto out); |
3257 | runtime = substream->runtime; | 3259 | runtime = substream->runtime; |
3258 | 3260 | ||
3259 | err = fasync_helper(fd, file, on, &runtime->fasync); | 3261 | err = fasync_helper(fd, file, on, &runtime->fasync); |
3262 | out: | ||
3263 | unlock_kernel(); | ||
3260 | if (err < 0) | 3264 | if (err < 0) |
3261 | return err; | 3265 | return err; |
3262 | return 0; | 3266 | return 0; |