From: "Tom Spink" <tspink@gmail.com>
To: "Matthew Wilcox" <matthew@wil.cx>
Cc: "Christoph Hellwig" <hch@infradead.org>,
"Al Viro" <viro@zeniv.linux.org.uk>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: [RFC PATCH] Introduce filesystem type tracking
Date: Tue, 20 May 2008 16:36:50 +0100 [thread overview]
Message-ID: <7b9198260805200836q6b9ad5f0x3b42c8f6c933fa21@mail.gmail.com> (raw)
In-Reply-To: <20080520153456.GN2638@parisc-linux.org>
2008/5/20 Matthew Wilcox <matthew@wil.cx>:
> On Tue, May 20, 2008 at 04:18:14PM +0100, Tom Spink wrote:
>> +
>> + mutex_lock(&type->fs_supers_lock);
>> + if (list_empty(&type->fs_supers) && type->init) {
>> + err = type->init();
>> + if (err) {
>> + mutex_unlock(&type->fs_supers_lock);
>> + spin_unlock(&sb_lock);
>> + destroy_super(s);
>> + return ERR_PTR(err);
>> + }
>> + }
>> +
>> + list_add(&s->s_instances, &type->fs_supers);
>> + mutex_unlock(&type->fs_supers_lock);
>> +
>> s->s_type = type;
>> strlcpy(s->s_id, type->name, sizeof(s->s_id));
>> list_add_tail(&s->s_list, &super_blocks);
>> - list_add(&s->s_instances, &type->fs_supers);
>> +
>> spin_unlock(&sb_lock);
>
> You can't take a mutex while holding a spinlock -- what if you had to
> sleep to acquire the mutex?
>
> I imagine you also don't want to hold a spinlock while calling the
> ->init or ->exit -- what if the fs wants to sleep in there (eg allocate
> memory with GFP_KERNEL).
>
> --
> Intel are signing my paycheques ... these opinions are still mine
> "Bill, look, we understand that you're interested in selling us this
> operating system, but compare it to ours. We can't possibly take such
> a retrograde step."
>
Oh no! This is bad. I really need to devise some script to stress
test my code - and also make myself pay attention to what I'm doing.
Sorry for the noise, guys.
--
Tom Spink
next prev parent reply other threads:[~2008-05-20 15:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-19 11:22 Tom Spink
2008-05-20 13:06 ` Tom Spink
2008-05-20 13:43 ` Al Viro
2008-05-20 13:50 ` Tom Spink
2008-05-20 13:57 ` Christoph Hellwig
2008-05-20 15:18 ` Tom Spink
2008-05-20 15:34 ` Matthew Wilcox
2008-05-20 15:36 ` Tom Spink [this message]
2008-05-20 21:08 ` Tom Spink
2008-05-20 22:00 ` Matthew Wilcox
2008-05-20 22:22 ` Tom Spink
2008-05-21 14:49 ` Tom Spink
2008-05-21 9:42 ` Jan Engelhardt
2026-02-18 9:49 ` Christian Brauner
2026-02-19 5:51 ` Christoph Hellwig
2026-02-19 8:04 ` Christian Brauner
2026-02-19 8:45 ` Christian Brauner
2026-02-20 5:43 ` David Timber
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=7b9198260805200836q6b9ad5f0x3b42c8f6c933fa21@mail.gmail.com \
--to=tspink@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®