All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <mason@suse.com>
To: Andrew Morton <akpm@digeo.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	"ext3-users@redhat.com" <ext3-users@redhat.com>
Subject: Re: ext3 updates for 2.4.20
Date: 16 Dec 2002 16:28:12 -0500	[thread overview]
Message-ID: <1040074092.17448.80.camel@tiny> (raw)
In-Reply-To: <3DFCE5E7.A8BE82B4@digeo.com>

Hmmm, this took me a while to find the first time around in the
commit_super code, and I almost forgot about it.

Looking at the loop in sync_supers()

       while (sb != sb_entry(&super_blocks))
                if (sb->s_dirt) {
                        sb->s_count++;
                        spin_unlock(&sb_lock);

Right here, we can race against kill_super, which means an unmount can
make the FS go away completely.  The only thing that saves the
write_super() call is a check for s->s_root != NULL.  Since we don't
check that before calling sync_fs, it should race against an unmount.

                        down_read(&sb->s_umount);
                        write_super(sb);
                        if (wait && sb->s_op && sb->s_op->sync_fs)
                                sb->s_op->sync_fs(sb);
                        drop_super(sb);
                        goto restart;
                } else

Any reason ext3 can't have a check for s_root in there?

-chris



      reply	other threads:[~2002-12-16 21:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-15 20:28 ext3 updates for 2.4.20 Andrew Morton
2002-12-16 21:28 ` Chris Mason [this message]

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=1040074092.17448.80.camel@tiny \
    --to=mason@suse.com \
    --cc=akpm@digeo.com \
    --cc=ext3-users@redhat.com \
    --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.