Re: ext3 updates for 2.4.20

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




_______________________________________________

Ext3-users@redhat.com
https://listman.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux