aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sync.c')
-rw-r--r--fs/sync.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/sync.c b/fs/sync.c
index 92b228176f7c..ad6691bae370 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -99,10 +99,13 @@ static void sync_filesystems(int wait)
99 mutex_lock(&mutex); /* Could be down_interruptible */ 99 mutex_lock(&mutex); /* Could be down_interruptible */
100 spin_lock(&sb_lock); 100 spin_lock(&sb_lock);
101 list_for_each_entry(sb, &super_blocks, s_list) 101 list_for_each_entry(sb, &super_blocks, s_list)
102 sb->s_need_sync = 1; 102 if (!list_empty(&sb->s_instances))
103 sb->s_need_sync = 1;
103 104
104restart: 105restart:
105 list_for_each_entry(sb, &super_blocks, s_list) { 106 list_for_each_entry(sb, &super_blocks, s_list) {
107 if (list_empty(&sb->s_instances))
108 continue;
106 if (!sb->s_need_sync) 109 if (!sb->s_need_sync)
107 continue; 110 continue;
108 sb->s_need_sync = 0; 111 sb->s_need_sync = 0;