summaryrefslogtreecommitdiffstats
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 92b2281..ad6691b 100644
--- 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;
OpenPOWER on IntegriCloud