diff options
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 (patch) | |
tree | 822af803e7e75ed476b0a176639c162e0395910d /fs/sync.c | |
parent | 1712ac8fda7d8bc4dc921f5777b7423aacad7263 (diff) |
Leave superblocks on s_list until the end
We used to remove from s_list and s_instances at the same
time. So let's *not* do the former and skip superblocks
that have empty s_instances in the loops over s_list.
The next step, of course, will be to get rid of rescan logics
in those loops.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/sync.c')
-rw-r--r-- | fs/sync.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 | ||
104 | restart: | 105 | restart: |
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; |