author: Al Viro <viro@zeniv.linux.org.uk> 2010-03-22 19:36:35 -0400
committer: Al Viro <viro@zeniv.linux.org.uk> 2010-05-21 18:31:14 -0400
commit: 551de6f34dfeefbeeadb32909c387d393114ecc8
parent: 1712ac8fda7d8bc4dc921f5777b7423aacad7263
Commit Summary:
Diffstat:
1 file changed, 4 insertions, 1 deletion
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)
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;