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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user