diff --git a/[refs] b/[refs] index 782465c06ef5..4eb8cce41684 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 65ee2ba3105f6ca3b8814d993682d4f21a1f0d8d +refs/heads/master: 171d9f7d786681e76bb289d01d8f897cbc50de57 diff --git a/trunk/sound/sound_core.c b/trunk/sound/sound_core.c index 7c2d677a2df5..c8627fcd4900 100644 --- a/trunk/sound/sound_core.c +++ b/trunk/sound/sound_core.c @@ -576,8 +576,6 @@ static int soundcore_open(struct inode *inode, struct file *file) struct sound_unit *s; const struct file_operations *new_fops = NULL; - lock_kernel (); - chain=unit&0x0F; if(chain==4 || chain==5) /* dsp/audio/dsp16 */ { @@ -630,18 +628,23 @@ static int soundcore_open(struct inode *inode, struct file *file) const struct file_operations *old_fops = file->f_op; file->f_op = new_fops; spin_unlock(&sound_loader_lock); - if(file->f_op->open) + + if (file->f_op->open) { + /* TODO: push down BKL into indivial open functions */ + lock_kernel(); err = file->f_op->open(inode,file); + unlock_kernel(); + } + if (err) { fops_put(file->f_op); file->f_op = fops_get(old_fops); } + fops_put(old_fops); - unlock_kernel(); return err; } spin_unlock(&sound_loader_lock); - unlock_kernel(); return -ENODEV; }