]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/sync.c
Leave superblocks on s_list until the end
[net-next-2.6.git] / fs / sync.c
index 92b228176f7cb05f4be58aabcae02e6ffb0b832d..ad6691bae37000abce4797b40a3eff5671e7a3e1 100644 (file)
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -99,10 +99,13 @@ static void sync_filesystems(int wait)
        mutex_lock(&mutex);             /* Could be down_interruptible */
        spin_lock(&sb_lock);
        list_for_each_entry(sb, &super_blocks, s_list)
-               sb->s_need_sync = 1;
+               if (!list_empty(&sb->s_instances))
+                       sb->s_need_sync = 1;
 
 restart:
        list_for_each_entry(sb, &super_blocks, s_list) {
+               if (list_empty(&sb->s_instances))
+                       continue;
                if (!sb->s_need_sync)
                        continue;
                sb->s_need_sync = 0;