From: Andrew Morton <akpm@digeo.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] how to fix is_local_disk()?
Date: Sun, 4 May 2003 14:05:37 -0700 [thread overview]
Message-ID: <20030504140537.50310417.akpm@digeo.com> (raw)
In-Reply-To: <20030504191013.A10659@lst.de>
Christoph Hellwig <hch@lst.de> wrote:
>
> ...
> +static void do_emergency_remount(unsigned long foo)
> +{
> + struct super_block *sb;
> +
> + spin_lock(&sb_lock);
> + list_for_each_entry(sb, &super_blocks, s_list) {
> + sb->s_count++;
> + spin_unlock(&sb_lock);
> + down_read(&sb->s_umount);
> + if (sb->s_bdev && !(sb->s_flags & MS_RDONLY))
> + do_remount_sb(sb, MS_RDONLY, NULL, 1);
> + drop_super(sb);
You might need to check sb->s_root in here after acquiring sb->s_umount.
Otherwise the fs may have been unmounted while the semaphore was being waited
upon.
About half of the s_umount grabbers perform that check. The others might be
buggy. I'm not sure - it's all rather gunky in there and hard to tell what
the rules are.
next prev parent reply other threads:[~2003-05-04 20:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-04 7:00 [RFC] how to fix is_local_disk()? Christoph Hellwig
2003-05-04 7:30 ` Andrew Morton
2003-05-04 7:53 ` Christoph Hellwig
2003-05-04 8:00 ` Andrew Morton
2003-05-04 17:10 ` Christoph Hellwig
2003-05-04 21:05 ` Andrew Morton [this message]
2003-05-05 7:41 ` viro
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=20030504140537.50310417.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.