From: tytso@mit.edu
To: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: [PATCH] ext2/3 bugfix 1/6: Fix illegal sleep in mbcache.
Date: Wed, 06 Nov 2002 22:58:44 -0500 [thread overview]
Message-ID: <E189doa-0007GY-00@snap.thunk.org> (raw)
Fix illegal sleep in mbcache.
This patch from Andreas Gruenbacher fixes an illegal sleep trace.
mbcache.c | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diff -Nru a/fs/mbcache.c b/fs/mbcache.c
--- a/fs/mbcache.c Wed Nov 6 17:29:36 2002
+++ b/fs/mbcache.c Wed Nov 6 17:29:36 2002
@@ -324,14 +324,6 @@
goto fail;
spin_lock(&mb_cache_spinlock);
- if (list_empty(&mb_cache_list)) {
- if (mb_shrinker) {
- printk(KERN_ERR "%s: already have a shrinker!\n",
- __FUNCTION__);
- remove_shrinker(mb_shrinker);
- }
- mb_shrinker = set_shrinker(DEFAULT_SEEKS, mb_cache_shrink_fn);
- }
list_add(&cache->c_cache_list, &mb_cache_list);
spin_unlock(&mb_cache_spinlock);
return cache;
@@ -414,10 +406,6 @@
}
}
list_del(&cache->c_cache_list);
- if (list_empty(&mb_cache_list) && mb_shrinker) {
- remove_shrinker(mb_shrinker);
- mb_shrinker = 0;
- }
spin_unlock(&mb_cache_spinlock);
l = free_list.prev;
@@ -700,3 +688,18 @@
}
#endif /* !defined(MB_CACHE_INDEXES_COUNT) || (MB_CACHE_INDEXES_COUNT > 0) */
+
+static int __init init_mbcache(void)
+{
+ mb_shrinker = set_shrinker(DEFAULT_SEEKS, mb_cache_shrink_fn);
+ return 0;
+}
+
+static void __exit exit_mbcache(void)
+{
+ remove_shrinker(mb_shrinker);
+}
+
+module_init(init_mbcache)
+module_exit(exit_mbcache)
+
reply other threads:[~2002-11-07 3:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E189doa-0007GY-00@snap.thunk.org \
--to=tytso@mit.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox