From 4f23481e12e2b86110551e267f526e63d3ff11db Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 24 Mar 2011 09:50:15 +0100 Subject: [PATCH] --- yaml --- r: 242966 b: refs/heads/master c: a45e3d6b13e97506b616980c0f122c3389bcefa4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/core/init.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4e84e0c62751..7e4be19a0165 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b2e65c8e9133218eb28c30e79ddd3d66d4666ba0 +refs/heads/master: a45e3d6b13e97506b616980c0f122c3389bcefa4 diff --git a/trunk/sound/core/init.c b/trunk/sound/core/init.c index 3e65da21a08c..a0080aa45ae9 100644 --- a/trunk/sound/core/init.c +++ b/trunk/sound/core/init.c @@ -848,6 +848,7 @@ int snd_card_file_add(struct snd_card *card, struct file *file) return -ENOMEM; mfile->file = file; mfile->disconnected_f_op = NULL; + INIT_LIST_HEAD(&mfile->shutdown_list); spin_lock(&card->files_lock); if (card->shutdown) { spin_unlock(&card->files_lock); @@ -883,6 +884,9 @@ int snd_card_file_remove(struct snd_card *card, struct file *file) list_for_each_entry(mfile, &card->files_list, list) { if (mfile->file == file) { list_del(&mfile->list); + spin_lock(&shutdown_lock); + list_del(&mfile->shutdown_list); + spin_unlock(&shutdown_lock); if (mfile->disconnected_f_op) fops_put(mfile->disconnected_f_op); found = mfile;